Skip to content

Commit a7e029f

Browse files
Add GitHub Actions workflow for NPM publishing
1 parent d5e2c3a commit a7e029f

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to NPM
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
attestations: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- run: npm ci
23+
- run: npm run build
24+
25+
- run: npm publish --provenance --access public
26+
env:
27+
NODE_AUTH_TOKEN: ""
28+

0 commit comments

Comments
 (0)