File tree Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Commit check (lint, tests)
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ pull_request :
7+ branches :
8+ - master
9+
10+ jobs :
11+ build :
12+ name : Build
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ node-version : [18.x, 20.x]
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+ with :
22+ ref : ${{ github.event.pull_request.head.sha }}
23+ repository : ${{ github.event.pull_request.head.repo.full_name }}
24+
25+ - name : Setup Node.js ${{ matrix.node-version }}
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ${{ matrix.node-version }}
29+ cache : ' npm'
30+ cache-dependency-path : ' package-lock.json'
31+
32+ - name : Install
33+ run : npm ci
34+
35+ - name : Lint
36+ run : npm run lint
37+
38+ - name : Test and cover
39+ run : npm run cover
Original file line number Diff line number Diff line change 1+ name : Publish version
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ workflow_dispatch :
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js 20
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 20.x
20+ cache : ' npm'
21+ cache-dependency-path : ' package-lock.json'
22+ registry-url : ' https://registry.npmjs.org'
23+
24+ - name : Publish package on npm
25+ run : npm publish
26+ env :
27+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
28+
29+ - name : Draft Github release with archive
30+ uses : softprops/action-gh-release@v1
31+ with :
32+ draft : true
33+ body : |
34+ ### :warning: Breaking changes
35+
36+ ### :bulb: Features
37+
38+ ### :beetle: Bug fixes
39+
40+ ### :wrench: Technical
You can’t perform that action at this time.
0 commit comments