Skip to content

Commit 60fec3c

Browse files
committed
Add trusted publishing workflow for npm
1 parent 292ef36 commit 60fec3c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)