Skip to content

Commit

Permalink
Fix build condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuMoalic committed Jun 24, 2024
1 parent ed68a5b commit 9bfd9a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get previous package.json
run: git show origin/main:package.json > package.json.old

Expand All @@ -25,19 +26,23 @@ jobs:
echo "old_version=${OLD_VERSION}" >> $GITHUB_ENV
if [ "$NEW_VERSION" = "$OLD_VERSION" ]; then
echo "Version has not changed. Exiting."
exit 0
exit 1
fi
- run: npm install
if: ${{ env.new_version != env.old_version }}

- name: Publish to Open VSX Registry
if: ${{ env.new_version != env.old_version }}
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}

- name: Publish to Visual Studio Marketplace
if: ${{ env.new_version != env.old_version }}
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

0 comments on commit 9bfd9a5

Please sign in to comment.