File tree Expand file tree Collapse file tree 2 files changed +48
-57
lines changed Expand file tree Collapse file tree 2 files changed +48
-57
lines changed Original file line number Diff line number Diff line change 1
1
name : Release and Publish
2
2
3
3
on :
4
- pull_request :
5
- push :
6
- branches : [ master ]
4
+ push :
5
+ branches :
6
+ - master
7
+ - alpha
8
+ - beta
9
+ - next
7
10
8
11
jobs :
9
- test :
10
- runs-on : ubuntu-latest
11
- steps :
12
- - name : Checkout
13
- uses : actions/checkout@v4
14
- - name : Setup Node.js
15
- uses : actions/setup-node@v4
16
- with :
17
- node-version : 20
18
- - name : npm install
19
- run : |
20
- npm install
21
- - name : npm lint
22
- run : |
23
- npm run lint
24
- - name : npm test
25
- run : |
26
- npm test
12
+ test :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout code
16
+ uses : actions/checkout@v4
27
17
28
- release :
29
- if : github.event_name == 'push' && github.ref == 'refs/heads/master'
30
- runs-on : ubuntu-latest
31
- needs : [test]
32
- steps :
33
- - name : Checkout
34
- uses : actions/checkout@v4
35
- - name : Setup Node.js
36
- uses : actions/setup-node@v4
37
- with :
38
- node-version : 20
39
- - name : npm install
40
- run : |
41
- npm install
42
- - name : npx semantic- release
43
- run : |
44
- npx semantic-release
45
- env :
46
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
18
+ - name : Setup Node.js
19
+ uses : actions/setup-node@v4
20
+ with :
21
+ node-version : 20
22
+
23
+ - name : Install dependencies
24
+ run : npm install
25
+
26
+ - name : Lint files
27
+ run : npm run lint
28
+
29
+ - name : Run tests
30
+ run : npm run test
31
+
32
+ - name : Run semantic release
33
+ run : npx semantic-release
34
+ env :
35
+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
36
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
1
name : Run Lint and Tests
2
2
3
- on : push
3
+ on :
4
+ push :
5
+ branches-ignore :
6
+ - master
7
+ - alpha
8
+ - beta
9
+ - next
4
10
5
11
jobs :
6
12
build :
7
- runs-on : ubuntu-latest
8
13
strategy :
9
14
matrix :
10
15
os : [ubuntu-latest, macOS-latest, windows-latest]
11
- node-version : [18.x, 20.x]
16
+ node-version : [18, 20]
17
+ runs-on : ${{ matrix.os }}
18
+
12
19
steps :
13
20
- uses : actions/checkout@v4
21
+
14
22
- name : Use Node.js ${{ matrix.node-version }}
15
23
uses : actions/setup-node@v4
16
24
with :
17
25
node-version : ${{ matrix.node-version }}
18
- - name : npm install
19
- run : |
20
- npm install
21
- env :
22
- CI : true
23
- - name : npm lint
24
- run : |
25
- npm run lint
26
- env :
27
- CI : true
28
- - name : npm test
29
- run : |
30
- npm test
26
+
27
+ - run : npm install
28
+
29
+ - run : npm run lint
30
+
31
+ - run : npm test
You can’t perform that action at this time.
0 commit comments