Skip to content

Commit 7e985af

Browse files
authored
feat: Add NPM publish workflow for automated package publishing (#208)
1 parent 6f7df40 commit 7e985af

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: NPM Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
registry-url: 'https://registry.npmjs.org/'
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Publish to npm
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23+
run: npm publish --access public

0 commit comments

Comments
 (0)