Skip to content

Commit 1598daf

Browse files
committed
ci: add publish workflow
1 parent 3cdc53e commit 1598daf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
2+
name: Node.js Package
3+
4+
on:
5+
workflow_dispatch:
6+
release:
7+
types: [published]
8+
9+
permissions:
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: corepack enable
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "24.x"
21+
registry-url: "https://registry.npmjs.org"
22+
- run: pnpm install
23+
- run: pnpm run build
24+
- run: pnpm publish --provenance --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)