Skip to content

Commit

Permalink
Add npm publish to GitHub actions (#203)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Koops <[email protected]>
  • Loading branch information
frederikprijck and jonkoops authored Aug 29, 2023
1 parent ba75e46 commit 3ca5403
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published

permissions:
contents: read

jobs:
publish-npm:
name: Publish to NPM
runs-on: ubuntu-latest
environment: release

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Build package
run: npm run build

- name: Publish release to NPM
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 3ca5403

Please sign in to comment.