Skip to content

Commit b116508

Browse files
committed
ci: publish npm package from version tags
1 parent b30379c commit b116508

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out repository
17+
uses: actions/checkout@v6
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: "24.x"
23+
registry-url: "https://registry.npmjs.org"
24+
package-manager-cache: false
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Typecheck
30+
run: npm run typecheck --if-present
31+
32+
- name: Test
33+
run: npm test --if-present
34+
35+
- name: Inspect package contents
36+
run: npm pack --dry-run
37+
38+
- name: Publish to npm
39+
run: npm publish --access public

0 commit comments

Comments
 (0)