File tree 2 files changed +44
-7
lines changed
2 files changed +44
-7
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
+
4
+ name : Deploy Package
5
+
6
+ on :
7
+ push :
8
+ branches : [ master ]
9
+
10
+ jobs :
11
+ build :
12
+
13
+ runs-on : ubuntu-latest
14
+
15
+ strategy :
16
+ matrix :
17
+ node-version : [14.x, 16.x, 18.x]
18
+
19
+ steps :
20
+ - uses : actions/checkout@v2
21
+ - name : Use Node.js ${{ matrix.node-version }}
22
+ uses : actions/setup-node@v1
23
+ with :
24
+ node-version : ${{ matrix.node-version }}
25
+ - run : npm install
26
+ - run : npm run build --if-present
27
+ - run : npm run lint
28
+ - run : npm test
29
+ deploy :
30
+ needs : build
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - uses : actions/checkout@v2
34
+ - uses : actions/setup-node@v1
35
+ with :
36
+ node-version : 18.x
37
+ - run : npm install
38
+ - run : npm run build --if-present
39
+ # https://github.com/marketplace/actions/npm-publish
40
+ - uses : JS-DevTools/npm-publish@v2
41
+ with :
42
+ token : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 4
4
name : Node.js CI
5
5
6
6
on :
7
- push :
8
- branches : [ master, next-major ]
9
7
pull_request :
10
8
branches : [ master, next-major ]
11
9
16
14
17
15
strategy :
18
16
matrix :
19
- node-version : [18.x]
17
+ node-version : [14.x, 16.x, 18.x]
20
18
21
19
steps :
22
20
- uses : actions/checkout@v2
26
24
node-version : ${{ matrix.node-version }}
27
25
- run : npm install
28
26
- run : npm run build --if-present
27
+ - run : npm run lint
29
28
- run : npm test
30
- # https://github.com/marketplace/actions/npm-publish
31
- - uses : JS-DevTools/npm-publish@v2
32
- with :
33
- token : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments