From 2dcb0051bee6757d3320fbda9b15fb498092e644 Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 15 Apr 2024 17:15:29 +0200 Subject: [PATCH] Explore publishing prerelease to local gh packages --- .github/workflows/build-wasm.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index 7b5de8435..dfba86ef8 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -28,6 +28,7 @@ jobs: uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: 18 + registry-url: "https://npm.pkg.github.com" cache: "npm" - name: Install dependencies @@ -56,3 +57,13 @@ jobs: name: sdk-bitwarden-wasm path: ${{ github.workspace }}/languages/js/wasm/* if-no-files-found: error + + - name: Set version + run: | + npm version --no-git-tag-version $(npm view @bitwarden/sdk-wasm@latest version) + npm version --no-git-tag-version prerelease + + - name: Publish NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}