From e14c4a4ad715c5655f7c9127a7ea468067b3e6a0 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Mon, 25 Sep 2023 10:51:29 -0400 Subject: [PATCH] Fix EXT_VERSION and ensure it is only defined once. - EXT_VERSION should be defined in both the pre-release and release cases following the preparation of the pre-release Signed-off-by: Roland Grunberg --- .github/workflows/release.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec03b0cf..2cc9cf29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,6 @@ jobs: - name: Install dependencies run: npm install -g typescript "vsce" "ovsx" - run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV - - run: 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 @@ -99,6 +98,11 @@ jobs: run: | npm install npm run vscode:prepublish + - name: Prepare Pre-Release + if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true' }} + run: | + npx gulp prepare_pre_release + echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV - run: | mkdir server/ if [ -e org.eclipse.lemminx*-uber.jar ]; then @@ -106,11 +110,7 @@ jobs: else cp ../staging/org.eclipse.lemminx*-uber.jar server/ fi - - name: Prepare Pre-Release - if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true' }} - run: | - npx gulp prepare_pre_release - echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV + echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV - name: Download LemMinX Binary Artifacts uses: actions/download-artifact@v3 - name: Prepare Binary Artifacts For Packaging @@ -178,7 +178,6 @@ jobs: - name: Install dependencies run: npm install -g typescript "vsce" "ovsx" - run: echo "XML_SERVER_VERSION=$(cat package.json | jq -r .xmlServer.version)" >> $GITHUB_ENV - - run: echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV - name: Set the link to download the binary server env: downloadLocation: https://github.com/redhat-developer/vscode-xml @@ -190,15 +189,15 @@ jobs: run: | npm install npm run vscode:prepublish - - run: | - mkdir server/ - mv lemminx-uber-jar/org.eclipse.lemminx*-uber.jar server/ - name: Prepare Pre-Release if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true' }} run: | npx gulp prepare_pre_release - echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV + - run: | + mkdir server/ + mv lemminx-uber-jar/org.eclipse.lemminx*-uber.jar server/ + 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' }} run: |