Skip to content

Commit 0441bf2

Browse files
committed
Adding package publish workflow & testing on multiple Node versions.
1 parent f01339b commit 0441bf2

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/check-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ on: [push, pull_request]
33
jobs:
44
build-and-test-ts:
55
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
node: [ '12', '14', '16' ]
9+
name: Node ${{ matrix.node }} build & test
610
steps:
711
- uses: actions/checkout@v2
812
- uses: actions/setup-node@v2
913
with:
10-
node-version: '14'
14+
node-version: ${{ matrix.node }}
1115
- run: npm ci
1216
- run: npm run lint
1317
- run: npm test
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish NPM Package
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '14'
13+
registry-url: 'https://registry.npmjs.org'
14+
- run: npm ci
15+
- run: npm publish
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)