Skip to content

Commit 3884fa5

Browse files
rgrunberdatho7561
authored andcommitted
Use the extension version in download URL for binary.
- 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]>
1 parent e62c9bd commit 3884fa5

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ jobs:
8686
node-version: '18'
8787
- name: Install dependencies
8888
run: npm install -g typescript "@vscode/vsce" "ovsx"
89-
- run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
90-
- name: Download LemMinX Server Uber Jar
91-
env:
92-
downloadLocation: https://github.com/redhat-developer/vscode-xml
93-
if: "${{ inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true' }}"
94-
run: |
95-
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
96-
sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.XML_SERVER_VERSION }}|g" package.json
9789
- name: Build vscode-xml
9890
run: |
9991
npm install
@@ -103,14 +95,24 @@ jobs:
10395
run: |
10496
npx gulp prepare_pre_release
10597
echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV
98+
- name: Prepare Environment Variables
99+
run: |
100+
echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
101+
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
102+
- name: Download LemMinX Server Uber Jar
103+
env:
104+
downloadLocation: https://github.com/redhat-developer/vscode-xml
105+
if: "${{ inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true' }}"
106+
run: |
107+
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
108+
sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.EXT_VERSION }}|g" package.json
106109
- run: |
107110
mkdir server/
108111
if [ -e org.eclipse.lemminx*-uber.jar ]; then
109112
mv org.eclipse.lemminx*-uber.jar server/
110113
else
111114
cp ../staging/org.eclipse.lemminx*-uber.jar server/
112115
fi
113-
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
114116
- name: Download LemMinX Binary Artifacts
115117
uses: actions/download-artifact@v4
116118
- name: Prepare Binary Artifacts For Packaging
@@ -189,12 +191,6 @@ jobs:
189191
node-version: '18'
190192
- name: Install dependencies
191193
run: npm install -g typescript "@vscode/vsce" "ovsx"
192-
- run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
193-
- name: Set the link to download the binary server
194-
env:
195-
downloadLocation: https://github.com/redhat-developer/vscode-xml
196-
if: ${{ inputs.publishToMarketPlace == 'true' }}
197-
run: sed -i -e "s|${{ env.downloadLocation }}/releases/download/latest|${{ env.downloadLocation }}/releases/download/${{ env.XML_SERVER_VERSION }}|g" package.json
198194
- name: Download VSIX & LemMinX Server Uber Jar
199195
uses: actions/download-artifact@v4
200196
- name: Build vscode-xml
@@ -206,9 +202,9 @@ jobs:
206202
run: |
207203
npx gulp prepare_pre_release
208204
echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV
209-
- run: |
210-
mkdir server/
211-
mv lemminx-uber-jar/org.eclipse.lemminx*-uber.jar server/
205+
- name: Prepare Environment Variables
206+
run: |
207+
echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV
212208
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
213209
- name: Publish to VS Code Marketplace
214210
if: ${{ github.event_name == 'schedule' || inputs.publishToMarketPlace == 'true' || inputs.publishPreRelease == 'true' }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"SVG"
2323
],
2424
"xmlServer": {
25-
"version": "0.28.1"
25+
"version": "0.28.0"
2626
},
2727
"binaryServerDownloadUrl": {
2828
"linux": "https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-linux.zip",

0 commit comments

Comments
 (0)