Skip to content

Commit e39ac64

Browse files
ci: add npm publish workflow (triggers on release or manual dispatch)
1 parent c6f90b5 commit e39ac64

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "22"
21+
registry-url: "https://registry.npmjs.org"
22+
23+
- name: Publish to npm
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
run: |
27+
npm publish --access public
28+

0 commit comments

Comments
 (0)