File tree Expand file tree Collapse file tree 3 files changed +44
-16
lines changed Expand file tree Collapse file tree 3 files changed +44
-16
lines changed Original file line number Diff line number Diff line change 1- # This is a basic workflow to help you get started with Actions
1+ name : CI Code Quality Workflow
22
3- name : CI
4-
5- # Controls when the workflow will run
63on :
74 push :
85 branches : [ master ]
9- # pull_request:
10- # branches: [ master ]
6+ pull_request :
7+ branches : [ master ]
118
129 # Allows you to run this workflow manually from the Actions tab
1310 workflow_dispatch :
1411
1512# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1613jobs :
17- publishgpr :
14+ validate :
1815 # The type of runner that the job will run on
1916 runs-on : ubuntu-latest
2017
@@ -24,21 +21,14 @@ jobs:
2421 - uses : actions/checkout@v2
2522 - uses : actions/setup-node@v2
2623 with :
27- node-version : ' 16 '
24+ node-version : 14
2825 - run : npm install
2926
30- - name : Validate TS
27+ - name : Lint TS
3128 run : npm run lint
3229
3330 - name : Test TS
3431 run : npm test
3532
3633 - name : TS to JS
3734 run : npm run build
38-
39- - uses : actions/setup-node@v2
40- with :
41- registry-url : ' https://npm.pkg.github.com'
42- - run : npm publish
43- env :
44- NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : CI Release workflow
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - uses : actions/setup-node@v2
13+ with :
14+ node-version : 14
15+ - run : npm ci
16+ - run : npm lint
17+ - run : npm test
18+ - run : npm build
19+
20+ publish-gpr :
21+ needs : build
22+ runs-on : ubuntu-latest
23+ permissions :
24+ packages : write
25+ contents : read
26+ steps :
27+ - uses : actions/checkout@v2
28+ - uses : actions/setup-node@v2
29+ with :
30+ node-version : 14
31+ registry-url : https://npm.pkg.github.com/
32+ - run : npm ci
33+ - run : npm publish
34+ env :
35+ NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change 1414 "files" : [
1515 " lib/**/*"
1616 ],
17+ "publishConfig" : {
18+ "IvanRave:registry" : " https://npm.pkg.github.com"
19+ },
1720 "scripts" : {
1821 "build" : " tsc" ,
1922 "test" : " jest" ,
You can’t perform that action at this time.
0 commit comments