Skip to content

Commit 352b186

Browse files
authored
ci: publish release to npm (#146)
Requires npm access token in GH secret NPM_TOKEN
1 parent 1ae73e9 commit 352b186

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- uses: actions/setup-node@v2
2020
with:
2121
node-version: '16'
22+
registry-url: 'https://registry.npmjs.org'
2223
- name: Install dependencies
2324
if: startsWith(matrix.os, 'ubuntu')
2425
run: sudo apt-get install libxtst-dev libpng++-dev
@@ -32,3 +33,8 @@ jobs:
3233
- name: Release prebuilt artifacts (win ia32)
3334
if: github.event_name == 'release' && github.event.action == 'published' && startsWith(matrix.os, 'windows')
3435
run: npx prebuild --all -r napi --arch ia32 -u ${{ secrets.PUBLISH_TOKEN }}
36+
- name: Release to npm
37+
if: github.event_name == 'release' && github.event.action == 'published'
38+
run: npm publish
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)