Skip to content

Commit 31b4eb2

Browse files
committed
Add GitHub workflow to publish releases to npm
Signed-off-by: Andrew Richardson <[email protected]>
1 parent 86c279a commit 31b4eb2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: npm Release
2+
3+
on:
4+
release:
5+
types: [released, prereleased]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
uses: actions/checkout@v2
12+
13+
- name: Use Node.js
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: '16.x'
17+
18+
- run: npm ci
19+
20+
- name: Release to NPM
21+
run: npm publish
22+
env:
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)