Skip to content

Commit 8b1db6b

Browse files
committed
Add GitHub Actions: auto publish to npm
1 parent ab77baf commit 8b1db6b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: '18.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
- run: npm install -g npm
20+
- run: npm ci
21+
- run: npm publish --provenance --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)