Skip to content

Commit a9083bc

Browse files
committedApr 28, 2022
chore: update workflow
1 parent 6f85d63 commit a9083bc

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed
 

‎.github/workflows/node.js.yml

-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ on: [push]
66

77
jobs:
88
build:
9-
109
runs-on: ${{ matrix.os }}
11-
1210
strategy:
1311
matrix:
1412
node-version: [14, 16, 18]

‎.github/workflows/npm_publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
2+
3+
name: Node.js Package
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
- run: npm ci
18+
- run: npm test
19+
20+
publish-npm:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: 16
28+
registry-url: https://registry.npmjs.org/
29+
- run: npm ci
30+
- run: npm run build
31+
- run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)
Please sign in to comment.