Skip to content

Commit c4f3ca9

Browse files
comclaude
authored andcommitted
ci: add trusted publishing workflow for npm
Publishes to npm with provenance on version tags (v*). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e7bb3e6 commit c4f3ca9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)