devops: add NPM publishing (#4)

Requires the `NPM_TOKEN` secret to be set.
This commit is contained in:
Max Schmitt
2025-03-27 18:08:43 +01:00
committed by GitHub
parent dc6273203e
commit 878b46588b

18
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Publish
on:
release:
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}