File tree 2 files changed +8
-11
lines changed
2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 4
4
5
5
name : Node.js CI
6
6
7
- on : [push]
7
+ on :
8
+ push :
9
+ pull_request :
10
+ branches : [ master ]
8
11
9
12
jobs :
10
13
build :
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
1
+ # This workflow will do a clean install of node dependencies and publishes via npm
2
2
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
3
4
4
name : Node.js Publish CI
5
5
6
6
on :
7
- push :
8
- branches : [ master ]
9
7
pull_request :
8
+ types : [ closed ]
10
9
branches : [ master ]
11
10
12
11
jobs :
13
12
build :
14
-
13
+ if : github.event.pull_request.merged == true
15
14
runs-on : ubuntu-latest
16
15
17
- strategy :
18
- matrix :
19
- node-version : [16.x, 18.x, 20.x]
20
-
21
16
steps :
22
17
- uses : actions/checkout@v4
23
18
- name : Use Node.js ${{ matrix.node-version }}
24
19
uses : actions/setup-node@v4
25
20
with :
26
- node-version : ${{ matrix.node-version }}
21
+ node-version : 20.x
27
22
registry-url : ' https://registry.npmjs.org'
28
23
- run : npm install
29
- - run : npm test
30
24
env :
31
25
CI : true
32
26
- run : npm publish
You can’t perform that action at this time.
0 commit comments