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' }}
0 commit comments