Skip to content

Commit 5d5e911

Browse files
committed
chore: add package publishing
1 parent 94660d2 commit 5d5e911

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
name: Publish to npm
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10.28.0
25+
26+
- name: Use Node.js 24
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '24'
30+
registry-url: 'https://registry.npmjs.org'
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build project
37+
run: pnpm run build
38+
39+
- name: Run tests
40+
run: pnpm run test
41+
42+
- name: Publish to npm
43+
run: npm publish

0 commit comments

Comments
 (0)