File tree Expand file tree Collapse file tree 3 files changed +68
-1
lines changed Expand file tree Collapse file tree 3 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ types : published
6+
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ node-version : [10.x, 12.x, 14.x]
13+ env :
14+ TZ : Asia/Tokyo
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Use Node.js ${{ matrix.node-version }}
18+ uses : actions/setup-node@v1
19+ with :
20+ node-version : ${{ matrix.node-version }}
21+ - run : npm ci
22+ - run : npm test
23+ env :
24+ CI : true
25+
26+ publish :
27+ needs : test
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v2
31+ - uses : actions/setup-node@v1
32+ with :
33+ node-version : 14
34+ registry-url : https://registry.npmjs.org/
35+ - run : npm ci
36+ - run : npm run build
37+ - run : npm publish lib
38+ env :
39+ NODE_AUTH_TOKEN : ${{ secrets.npm_token }}
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : master
6+ pull_request :
7+ branches : master
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ node-version : [10.x, 12.x, 14.x]
15+ env :
16+ TZ : Asia/Tokyo
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Use Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v1
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+ - run : npm ci
24+ - run : |
25+ npm test
26+ # bash <(curl -s https://codecov.io/bash) -t ${{ secrets.codecov_token }}
27+ env:
28+ CI: true
Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "scripts" : {
77 "build" : " rimraf ./lib && tsc -p tsconfig.lib.json && cp package.json README.md LICENSE ./lib" ,
8- "test" : " echo \" Error: no test specified \" && exit 1 "
8+ "test" : " exit 0 "
99 },
1010 "repository" : {
1111 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments