File tree 3 files changed +44
-16
lines changed
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
2
2
3
- name : CI
4
-
5
- # Controls when the workflow will run
6
3
on :
7
4
push :
8
5
branches : [ master ]
9
- # pull_request:
10
- # branches: [ master ]
6
+ pull_request :
7
+ branches : [ master ]
11
8
12
9
# Allows you to run this workflow manually from the Actions tab
13
10
workflow_dispatch :
14
11
15
12
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16
13
jobs :
17
- publishgpr :
14
+ validate :
18
15
# The type of runner that the job will run on
19
16
runs-on : ubuntu-latest
20
17
@@ -24,21 +21,14 @@ jobs:
24
21
- uses : actions/checkout@v2
25
22
- uses : actions/setup-node@v2
26
23
with :
27
- node-version : ' 16 '
24
+ node-version : 14
28
25
- run : npm install
29
26
30
- - name : Validate TS
27
+ - name : Lint TS
31
28
run : npm run lint
32
29
33
30
- name : Test TS
34
31
run : npm test
35
32
36
33
- name : TS to JS
37
34
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 14
14
"files" : [
15
15
" lib/**/*"
16
16
],
17
+ "publishConfig" : {
18
+ "IvanRave:registry" : " https://npm.pkg.github.com"
19
+ },
17
20
"scripts" : {
18
21
"build" : " tsc" ,
19
22
"test" : " jest" ,
You can’t perform that action at this time.
0 commit comments