Skip to content

Commit

Permalink
github action can now publich release candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie committed Dec 2, 2024
1 parent 6c3d0c2 commit 9a06a61
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,28 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run make
- run: npm publish --access public

- name: Publish NPM package (regular)
if: !github.event.release.prerelease
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

- name: Publish NPM package (pre-release)
if: github.event.release.prerelease
run: |
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 9a06a61

Please sign in to comment.