22
33on :
44 push :
5- branches : [ master, main, develop ]
5+ branches : [master, main, develop]
66 pull_request :
7- branches : [ master, main ]
7+ branches : [master, main]
88
99jobs :
1010 test :
@@ -15,84 +15,84 @@ jobs:
1515 node-version : [18.x, 20.x]
1616
1717 steps :
18- - uses : actions/checkout@v3
19-
20- - name : Use Node.js ${{ matrix.node-version }}
21- uses : actions/setup-node@v3
22- with :
23- node-version : ${{ matrix.node-version }}
24- cache : ' npm'
25-
26- - name : Install dependencies
27- run : npm ci
28-
29- - name : Configure Git for tests
30- run : |
31- git config --global user.email "[email protected] " 32- git config --global user.name "GitHub CI"
33-
34- - name : Build project
35- run : npm run build
36-
37- - name : Run linter
38- run : npm run lint
39-
40- - name : Run tests
41- run : npm test
42-
43- - name : Upload coverage reports
44- uses : codecov/codecov-action@v3
45- with :
46- file : ./coverage/lcov.info
47- flags : unittests
48- name : codecov-umbrella
49- if : matrix.node-version == '20.x'
18+ - uses : actions/checkout@v3
19+
20+ - name : Use Node.js ${{ matrix.node-version }}
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version : ${{ matrix.node-version }}
24+ cache : ' npm'
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : Configure Git for tests
30+ run : |
31+ git config --global user.email "[email protected] " 32+ git config --global user.name "GitHub CI"
33+
34+ - name : Build project
35+ run : npm run build
36+
37+ - name : Run linter
38+ run : npm run lint
39+
40+ - name : Run tests
41+ run : npm test
42+
43+ - name : Upload coverage reports
44+ uses : codecov/codecov-action@v3
45+ with :
46+ file : ./coverage/lcov.info
47+ flags : unittests
48+ name : codecov-umbrella
49+ if : matrix.node-version == '20.x'
5050
5151 build :
5252 runs-on : ubuntu-latest
5353 needs : test
5454
5555 steps :
56- - uses : actions/checkout@v3
57-
58- - name : Use Node.js
59- uses : actions/setup-node@v3
60- with :
61- node-version : ' 20.x'
62- cache : ' npm'
63-
64- - name : Install dependencies
65- run : npm ci
66-
67- - name : Build
68- run : npm run build
69-
70- - name : Check TypeScript
71- run : npm run type-check
56+ - uses : actions/checkout@v3
57+
58+ - name : Use Node.js
59+ uses : actions/setup-node@v3
60+ with :
61+ node-version : ' 20.x'
62+ cache : ' npm'
63+
64+ - name : Install dependencies
65+ run : npm ci
66+
67+ - name : Build
68+ run : npm run build
69+
70+ - name : Check TypeScript
71+ run : npm run type-check
7272
7373 publish :
7474 if : (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name == 'push'
7575 runs-on : ubuntu-latest
7676 needs : build
77-
77+
7878 steps :
79- - uses : actions/checkout@v3
80-
81- - name : Use Node.js
82- uses : actions/setup-node@v3
83- with :
84- node-version : ' 20.x'
85- cache : ' npm'
86- registry-url : ' https://registry.npmjs.org'
87-
88- - name : Install dependencies
89- run : npm ci
90-
91- - name : Build
92- run : npm run build
93-
94- - name : Publish to npm
95- run : npm publish --access public
96- env :
97- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
98- continue-on-error : true
79+ - uses : actions/checkout@v3
80+
81+ - name : Use Node.js
82+ uses : actions/setup-node@v3
83+ with :
84+ node-version : ' 20.x'
85+ cache : ' npm'
86+ registry-url : ' https://registry.npmjs.org'
87+
88+ - name : Install dependencies
89+ run : npm ci
90+
91+ - name : Build
92+ run : npm run build
93+
94+ - name : Publish to npm
95+ run : npm publish --access public
96+ env :
97+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
98+ continue-on-error : true
0 commit comments