File tree Expand file tree Collapse file tree 3 files changed +74
-4
lines changed
Expand file tree Collapse file tree 3 files changed +74
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ pull_request :
8+ branches :
9+ - ' **'
10+
11+ jobs :
12+
13+ build-check :
14+
15+ name : Build check
16+
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - uses : actions/checkout@v2
21+
22+ - run : yarn
23+ - run : yarn build
24+ - run : yarn test
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+
8+ jobs :
9+
10+ publish :
11+
12+ name : Publish
13+
14+ if : github.repository_owner == 'coajs'
15+
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v2
20+
21+ - uses : actions/setup-node@v1
22+ with :
23+ node-version : 12
24+ registry-url : https://registry.npmjs.org
25+
26+ - name : Build
27+ run : |
28+ yarn
29+ yarn version --no-git-tag-version --new-version ${{ github.event.release.tag_name }}
30+ yarn build
31+
32+ - name : Test
33+ run : |
34+ yarn test
35+
36+ - name : Publish
37+ env :
38+ NODE_AUTH_TOKEN : ${{ secrets.AEX_NPM_TOKEN }}
39+ run : |
40+ cd dist/src
41+ yarn publish
42+
43+ - name : Sync
44+ run : |
45+ sleep 5s
46+ yarn sync
Original file line number Diff line number Diff line change 1717 "url" : " https://github.com/coajs/coa-error.git"
1818 },
1919 "scripts" : {
20- "dev" : " tsc -w" ,
21- "build" : " rm -rf dist && tsc" ,
22- "test" : " mocha dist/test" ,
20+ "dev:watch" : " tsc -w" ,
2321 "test:watch" : " mocha dist/test --watch" ,
24- "npm-publish" : " yarn build && yarn version --patch && cp package.json *.md dist/src && cd dist/src && npm publish"
22+ "build" : " rm -rf dist* && tsc && cp package.json *.md dist/src" ,
23+ "test" : " mocha dist/test" ,
24+ "publish-prerelease" : " yarn build && cd dist/src && yarn version --prerelease && yarn publish"
2525 },
2626 "dependencies" : {},
2727 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments