File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change 1
1
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
2
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
3
4
- name : Releases cross platform binaries for nodejs-snowflake
4
+ name : Releases cross platform binaries for nodejs-snowflake and publishes to NPM
5
5
6
6
on :
7
7
push :
8
- branches : [master]
8
+ tags :
9
+ - ' *'
9
10
10
11
jobs :
11
12
build :
12
13
strategy :
13
14
matrix :
14
15
os : [ubuntu-latest, windows-latest, macos-latest]
15
- node-version : [12.17.0]
16
+ node-version : [12.17.0, 14.16.0 ]
16
17
runs-on : ${{ matrix.os }}
17
18
steps :
18
19
- uses : actions/checkout@v2
19
20
- name : Use Node.js ${{ matrix.node-version }}
20
21
uses : actions/setup-node@v1
21
22
with :
22
23
node-version : ${{ matrix.node-version }}
24
+ - name : Install Dependencies
25
+ - run : npm ci
26
+
27
+ - name : Build NodeJS Snowflake
28
+ - run : npm run build
29
+
30
+ - name : Run Tests
31
+ - run : npm t
32
+
33
+ - name : Publish artifacts on Github
23
34
- run : |
24
- npm i
25
35
npm i -g prebuild
26
- prebuild --all -r napi -u ${{ secrets.GITHUB_TOKEN }}
36
+ prebuild --all -r napi -u ${{ secrets.GITHUB_TOKEN }} --strip
37
+
38
+ - name : Publish Package to NPM
39
+ - uses : JS-DevTools/npm-publish@v1
40
+ with :
41
+ token : ${{ secrets.NPM_TOKEN }}
42
+ tag : ${GITHUB_REF##*/}
43
+
You can’t perform that action at this time.
0 commit comments