File tree Expand file tree Collapse file tree 3 files changed +86
-0
lines changed
Expand file tree Collapse file tree 3 files changed +86
-0
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 : build
5+
6+ on :
7+ push :
8+ branches : [master]
9+ pull_request :
10+ branches : [master]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+ node-version : [10.x, 12.x, 14.x]
19+
20+ steps :
21+ - uses : actions/checkout@v2
22+ - name : Use Node.js ${{ matrix.node-version }}
23+ uses : actions/setup-node@v1
24+ with :
25+ node-version : ${{ matrix.node-version }}
26+ - run : npm ci
27+ - run : npm run build --if-present
Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : actions/setup-node@v1
14+ with :
15+ node-version : 12
16+ - run : sudo apt-get install xvfb
17+ - run : npm ci
18+ - run : npm run build --if-present
19+ env :
20+ CI : true
21+
22+ publish-npm :
23+ needs : build
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v2
27+ - uses : actions/setup-node@v1
28+ with :
29+ node-version : 12
30+ registry-url : https://registry.npmjs.org/
31+ - run : npm ci
32+ - run : npm run prerelease
33+ - run : npm publish
34+ env :
35+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ name : Create Release
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+ - name : Create Release
16+ id : create_release
17+ uses : actions/create-release@v1
18+ env :
19+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
20+ with :
21+ tag_name : ${{ github.ref }}
22+ release_name : ${{ github.ref }}
23+ draft : false
24+ prerelease : false
You can’t perform that action at this time.
0 commit comments