File tree 1 file changed +41
-13
lines changed
1 file changed +41
-13
lines changed Original file line number Diff line number Diff line change @@ -5,27 +5,55 @@ name: Node.js CI
5
5
6
6
on :
7
7
push :
8
- branches : [ master ]
8
+ branches : [master]
9
9
pull_request :
10
- branches : [ master ]
10
+ branches : [master]
11
11
12
12
jobs :
13
13
build :
14
-
15
14
runs-on : ubuntu-latest
16
15
17
16
strategy :
18
17
matrix :
19
18
node-version : [10.x, 12.x]
20
19
21
20
steps :
22
- - uses : actions/checkout@v2
23
- - name : Use Node.js ${{ matrix.node-version }}
24
- uses : actions/setup-node@v1
25
- with :
26
- node-version : ${{ matrix.node-version }}
27
- - run : npm ci
28
- - run : npm run build --if-present
29
- # - run: npm test
30
- env :
31
- CI : true
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
28
+ # - run: npm test
29
+ env :
30
+ CI : true
31
+
32
+ publish-npm :
33
+ needs : build
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ - uses : actions/checkout@v2
37
+ - uses : actions/setup-node@v1
38
+ with :
39
+ node-version : 10
40
+ registry-url : https://registry.npmjs.org/
41
+ - run : npm ci
42
+ - run : pwd
43
+ - run : npm publish --access=public
44
+ env :
45
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
46
+
47
+ publish-gpr :
48
+ needs : build
49
+ runs-on : ubuntu-latest
50
+ steps :
51
+ - uses : actions/checkout@v2
52
+ - uses : actions/setup-node@v1
53
+ with :
54
+ node-version : 12
55
+ registry-url : https://npm.pkg.github.com/
56
+ - run : npm ci
57
+ - run : npm publish
58
+ env :
59
+ NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments