Skip to content

Commit a86a21b

Browse files
committed
Add workflow for npm publish
1 parent 74e425c commit a86a21b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow publishes the package to npm when a release is created.
2+
3+
name: Publish
4+
on:
5+
release:
6+
types: [created]
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 18
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm ci
17+
- run: npm run build --if-present
18+
- run: npm publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)