File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [push]
3+ jobs :
4+ build :
5+ name : Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
6+
7+ runs-on : ${{ matrix.os }}
8+ strategy :
9+ matrix :
10+ node : ['10.x', '12.x', '14.x']
11+ os : [ubuntu-latest, windows-latest, macOS-latest]
12+
13+ steps :
14+ - name : Checkout repo
15+ uses : actions/checkout@v2
16+
17+ - name : Use Node ${{ matrix.node }}
18+ uses : actions/setup-node@v1
19+ with :
20+ node-version : ${{ matrix.node }}
21+
22+ - name : Install deps and build (with cache)
23+ uses : bahmutov/npm-install@v1
24+
25+ - name : Lint
26+ run : yarn lint
27+
28+ - name : Test
29+ run : yarn test --ci --coverage --maxWorkers=2
30+
31+ - name : Build
32+ run : yarn build
Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+ name : Node.js Package
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ jobs :
11+ publish-gpr :
12+ # needs: build
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+ steps :
18+ - uses : actions/checkout@v3
19+ - uses : actions/setup-node@v3
20+ with :
21+ node-version : 16
22+ registry-url : ' https://registry.npmjs.org'
23+ - run : npm ci
24+ - run : npm publish
25+ env :
26+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments