@@ -2,58 +2,48 @@ name: Test & Maybe Release
2
2
on : [push, pull_request]
3
3
jobs :
4
4
test :
5
- name : Node ${{ matrix.node }} on ${{ matrix.os }}
6
- runs-on : ${{ matrix.os }}
7
-
8
5
strategy :
9
6
fail-fast : false
10
7
matrix :
11
- node : [14, 16]
12
- # windows support not quite ready: os: [ubuntu-latest, windows-latest]
13
- os : [ubuntu-latest]
14
-
8
+ node : [16.x, 18.x, lts/*, current]
9
+ os : [macos-latest, ubuntu-latest, windows-latest]
10
+ runs-on : ${{ matrix.os }}
15
11
steps :
16
- - name : Clone repository
12
+ - name : Checkout Repository
17
13
uses : actions/checkout@v3
18
-
19
- - run : git fetch --prune --unshallow
20
-
21
- - name : Set Node.js version
22
- uses : actions/setup-node@v3
14
+ with :
15
+ fetch-depth : 0
16
+ - name : Use Node.js ${{ matrix.node }}
17
+
23
18
with :
24
19
node-version : ${{ matrix.node }}
25
-
26
- - run : node --version
27
- - run : npm --version
28
- - run : git --version
29
-
30
- - name : Install npm dependencies
31
- run : npm install
32
-
20
+ - name : Install Dependencies
21
+ run : |
22
+ npm install --no-progress
33
23
- name : Run tests
34
- run : npm test
35
-
24
+ run : |
25
+ npm config set script-shell bash
26
+ npm run test:ci
36
27
release :
37
28
name : Release
38
29
needs : test
39
30
runs-on : ubuntu-latest
40
31
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
41
-
42
32
steps :
43
33
- name : Checkout
44
34
uses : actions/checkout@v3
45
35
with :
46
36
fetch-depth : 0
47
-
48
37
- name : Setup Node.js
49
- uses : actions/setup-node@v3
38
+ uses : actions/setup-node@v3.6.0
50
39
with :
51
- node-version : 14
52
-
40
+ node-version : lts/*
53
41
- name : Install dependencies
54
42
run : |
55
43
npm install --no-progress --no-package-lock --no-save
56
-
44
+ - name : Build
45
+ run : |
46
+ npm run build
57
47
- name : Install plugins
58
48
run : |
59
49
npm install \
65
55
@semantic-release/git \
66
56
@semantic-release/changelog \
67
57
--no-progress --no-package-lock --no-save
68
-
69
58
- name : Release
70
59
env :
71
60
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
61
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
73
62
run : npx semantic-release
63
+
0 commit comments