Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the extension version in download URL for binary. #999

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading