Update NPMjs publish configuration

This commit is contained in:
dennis committed 2026-02-08 16:54:57 +01:00
1 parent 7f97b81f77
commit b31fbe03fa
1 file changed
+17 -10
+17 -10
View File
@@ -1,18 +1,25 @@
name: Publish Package to npmjs
name: Publish Package
on:
release:
types: [created]
push:
tags:
- 'v*'
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}