chore: Add package publishing workflow (#11377)

This commit is contained in:
Michael Bromley 2025-04-02 21:49:34 +02:00 committed by GitHub
parent 72c6991680
commit 72beb26513
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

23
.github/workflows/publish-package.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Publish Package to npmjs
on:
release:
types: [published]
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: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run package
- run: cd build/package
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}