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

[PM-7447] Publish prerelease to GitHub packages #716

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Changes from 5 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
18 changes: 18 additions & 0 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -56,3 +57,20 @@ jobs:
name: sdk-bitwarden-wasm
path: ${{ github.workspace }}/languages/js/wasm/*
if-no-files-found: error

- name: Set version
if: ${{ github.ref == 'refs/head/main' }}
# Fetches current version from registry and uses prerelease to bump it
run: |
npm version --no-git-tag-version $(npm view @bitwarden/sdk-wasm@latest version)
npm version --no-git-tag-version prerelease
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: languages/js/wasm

- name: Publish NPM
if: ${{ github.ref == 'refs/head/main' }}
run: npm publish
dani-garcia marked this conversation as resolved.
Show resolved Hide resolved
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: languages/js/wasm
Loading