File tree Expand file tree Collapse file tree 2 files changed +44
-7
lines changed Expand file tree Collapse file tree 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 44name : Node.js CI
55
66on :
7- push :
8- branches : [ master, next-major ]
97 pull_request :
108 branches : [ master, next-major ]
119
1614
1715 strategy :
1816 matrix :
19- node-version : [18.x]
17+ node-version : [14.x, 16.x, 18.x]
2018
2119 steps :
2220 - uses : actions/checkout@v2
2624 node-version : ${{ matrix.node-version }}
2725 - run : npm install
2826 - run : npm run build --if-present
27+ - run : npm run lint
2928 - 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