From e869dbb7bbe0f9d17a40157098cc530f5194367d Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 15 Apr 2024 18:42:28 +0200 Subject: [PATCH] Only release on main --- .github/workflows/build-wasm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index 9e5a60841..ffbf15c36 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -59,6 +59,7 @@ jobs: if-no-files-found: error - name: Set version + if: ${{ github.ref == 'refs/head/main' }} run: | npm version --no-git-tag-version $(npm view @bitwarden/sdk-wasm@latest version) npm version --no-git-tag-version prerelease @@ -67,6 +68,7 @@ jobs: working-directory: languages/js/wasm - name: Publish NPM + if: ${{ github.ref == 'refs/head/main' }} run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}