Skip to content

Commit c56ff2d

Browse files
ci: add npm publish workflow for automated releases
Co-Authored-By: unknown <>
1 parent 6613da4 commit c56ff2d

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-node@v6
16+
with:
17+
node-version-file: .nvmrc
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm install
20+
- run: npm test
21+
- run: npm publish --provenance --access public

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

0 commit comments

Comments
 (0)