File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Node.js CI
2+ on : [push, pull_request]
3+
4+ jobs :
5+ test :
6+ if : contains(github.ref, 'refs/tags/') == false
7+ runs-on : ubuntu-latest
8+ strategy :
9+ matrix :
10+ node-version : [14.x, 16.x]
11+
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+ - name : Use Node.js ${{ matrix.node-version }}
16+ uses : actions/setup-node@v2
17+ with :
18+ cache : yarn
19+ node-version : ${{ matrix.node-version }}
20+ registry-url : https://registry.npmjs.org
21+ - name : Install packages
22+ run : yarn install --frozen-lockfile
23+ - name : Test
24+ run : yarn run test
Original file line number Diff line number Diff line change 1+ name : Node.js Publish
2+ on :
3+ release :
4+ types : [published]
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ node-version : [16.x]
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v2
16+ - name : Use Node.js ${{ matrix.node-version }}
17+ uses : actions/setup-node@v2
18+ with :
19+ cache : yarn
20+ node-version : ${{ matrix.node-version }}
21+ registry-url : https://registry.npmjs.org
22+ - name : Install packages
23+ run : yarn install --frozen-lockfile
24+ - name : Version
25+ run : yarn version --new-version "${GITHUB_REF:11}" --no-git-tag-version
26+ - name : Publish to NPM
27+ run : yarn publish --access public
28+ env :
29+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments