Skip to content

Commit 2959132

Browse files
committed
ci: add CD workflow for npm publish on version tags
1 parent 305e94a commit 2959132

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/cd.yml

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

0 commit comments

Comments
 (0)