Skip to content

Commit

Permalink
Create publish_npm.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause authored Nov 29, 2024
1 parent acbbb03 commit 61f9004
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish to npm
on:
release:
types: [published] # Run this whenever we create a new release through GitHub releases
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: |
npm ci
npm run build
npm test
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 61f9004

Please sign in to comment.