Skip to content

Commit

Permalink
Use the extension version in download URL for binary.
Browse files Browse the repository at this point in the history
- The language server version was used as the version for the download
  URL of the binary, but since the binaries are hosted under the
  vscode-xml release tab, it should match the vscode-xml release
- Remove some unnecessary steps from the release job

Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber authored and datho7561 committed May 28, 2024
1 parent e62c9bd commit 3884fa5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ jobs:
node-version: '18'
- name: Install dependencies
run: npm install -g typescript "@vscode/vsce" "ovsx"
- run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
- name: Download LemMinX Server Uber Jar
env:
downloadLocation: https://github.com/redhat-developer/vscode-xml
if: "${{ inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true' }}"
run: |
curl -Lo org.eclipse.lemminx-${{ env.XML_SERVER_VERSION }}-uber.jar https://repo.eclipse.org/content/repositories/lemminx-releases/org/eclipse/lemminx/org.eclipse.lemminx/${{ env.XML_SERVER_VERSION }}/org.eclipse.lemminx-${{ env.XML_SERVER_VERSION }}-uber.jar
sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.XML_SERVER_VERSION }}|g" package.json
- name: Build vscode-xml
run: |
npm install
Expand All @@ -103,14 +95,24 @@ jobs:
run: |
npx gulp prepare_pre_release
echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV
- name: Prepare Environment Variables
run: |
echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Download LemMinX Server Uber Jar
env:
downloadLocation: https://github.com/redhat-developer/vscode-xml
if: "${{ inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true' }}"
run: |
curl -Lo org.eclipse.lemminx-${{ env.XML_SERVER_VERSION }}-uber.jar https://repo.eclipse.org/content/repositories/lemminx-releases/org/eclipse/lemminx/org.eclipse.lemminx/${{ env.XML_SERVER_VERSION }}/org.eclipse.lemminx-${{ env.XML_SERVER_VERSION }}-uber.jar
sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.EXT_VERSION }}|g" package.json
- run: |
mkdir server/
if [ -e org.eclipse.lemminx*-uber.jar ]; then
mv org.eclipse.lemminx*-uber.jar server/
else
cp ../staging/org.eclipse.lemminx*-uber.jar server/
fi
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Download LemMinX Binary Artifacts
uses: actions/download-artifact@v4
- name: Prepare Binary Artifacts For Packaging
Expand Down Expand Up @@ -189,12 +191,6 @@ jobs:
node-version: '18'
- name: Install dependencies
run: npm install -g typescript "@vscode/vsce" "ovsx"
- run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
- name: Set the link to download the binary server
env:
downloadLocation: https://github.com/redhat-developer/vscode-xml
if: ${{ inputs.publishToMarketPlace == 'true' }}
run: sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.XML_SERVER_VERSION }}|g" package.json
- name: Download VSIX & LemMinX Server Uber Jar
uses: actions/download-artifact@v4
- name: Build vscode-xml
Expand All @@ -206,9 +202,9 @@ jobs:
run: |
npx gulp prepare_pre_release
echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV
- run: |
mkdir server/
mv lemminx-uber-jar/org.eclipse.lemminx*-uber.jar server/
- name: Prepare Environment Variables
run: |
echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Publish to VS Code Marketplace
if: ${{ github.event_name == 'schedule' || inputs.publishToMarketPlace == 'true' || inputs.publishPreRelease == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"SVG"
],
"xmlServer": {
"version": "0.28.1"
"version": "0.28.0"
},
"binaryServerDownloadUrl": {
"linux": "https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-linux.zip",
Expand Down

0 comments on commit 3884fa5

Please sign in to comment.