Skip to content

Commit e374e32

Browse files
committed
ci: add npm publish workflow with OIDC trusted publisher
1 parent a5b45ad commit e374e32

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.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+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
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+
24+
- run: npm run build
25+
26+
- run: npm publish --provenance --access public

0 commit comments

Comments
 (0)