Skip to content

Commit c324140

Browse files
committed
feat: added tests and coverage and bump version
1 parent 952cb15 commit c324140

File tree

6 files changed

+627
-10
lines changed

6 files changed

+627
-10
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'README.md'
7+
branches:
8+
- main
9+
push:
10+
paths-ignore:
11+
- 'README.md'
12+
branches:
13+
- main
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
strategy:
21+
matrix:
22+
os: [windows-latest, ubuntu-latest, macos-latest]
23+
node-version: [16.x, 18.x]
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
- run: npm install
32+
- run: npm run test
33+
env:
34+
CI: true

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '12.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm install
16+
- run: npm test
17+
- run: npm publish
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)