@@ -14,54 +14,43 @@ on: # yamllint disable-line rule:truthy
14
14
15
15
jobs :
16
16
test :
17
- name : " tests"
17
+ strategy :
18
+ matrix :
19
+ os : ["ubuntu-latest"]
20
+ node_version : ["14", "16", "17"]
21
+ include :
22
+ - os : " macos-latest"
23
+ node_version : " 16"
24
+ - os : " windows-latest"
25
+ node_version : " 16"
26
+ fail-fast : false
18
27
19
- runs-on : " ubuntu-latest"
28
+ name : " Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
29
+
30
+ runs-on : " ${{ matrix.os }}"
20
31
21
32
steps :
22
33
- name : " Git checkout"
23
34
uses : " actions/checkout@v2"
24
- with :
25
- fetch-depth : 0
26
- persist-credentials : false
27
35
env :
28
36
GIT_COMMITTER_NAME : " GitHub Actions Shell"
29
37
GIT_AUTHOR_NAME : " GitHub Actions Shell"
30
38
EMAIL : " github-actions[bot]@users.noreply.github.com"
31
39
32
- - name : " Configure Container"
33
- env :
34
- GIT_USER_EMAIL : " ${{ secrets.GIT_USER_EMAIL }}"
35
- GIT_USER_USERNAME : " ${{ secrets.GIT_USER_USERNAME }}"
36
- run : |
37
- EMAIL=${GIT_USER_EMAIL:-"github-actions[bot]@users.noreply.github.com"}
38
- NAME=${GIT_USER_USERNAME:-"github-actions-shell"}
39
-
40
- git config --global user.email "${EMAIL}"
41
- git config --global user.name "${NAME}"
42
-
43
- - name : " Use Node.js 12.x"
44
- uses : " actions/setup-node@v2"
40
+
45
41
with :
46
- node-version : " 12.x"
47
-
48
- - name : " Get yarn cache directory path"
49
- id : " yarn-cache-dir-path"
50
- run : " echo \" ::set-output name=dir::$(yarn config get cacheFolder)\" "
42
+ version : 6
51
43
52
- - uses : " actions/cache@v2 "
53
- id : " yarn-cache " # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
44
+ - name : " Set node version to ${{ matrix.node_version }} "
45
+ uses : " actions/setup-node@v2 "
54
46
with :
55
- path : " ${{ steps.yarn-cache-dir-path.outputs.dir }}"
56
- key : " ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}"
57
- restore-keys : |
58
- ${{ runner.os }}-yarn-
59
-
60
- - name : " update yarn to v3"
61
- run : " yarn set version 3.0.1"
47
+ node-version : " ${{ matrix.node_version }}"
48
+ cache : " pnpm"
62
49
63
- - name : " install"
64
- run : " yarn install --immutable"
50
+ - name : " Install packages"
51
+ run : " pnpm install --frozen-lockfile"
52
+ env :
53
+ NPM_TOKEN : " ${{ secrets.SEMANTIC_RELEASE_GITHUB_NPM_PACKAGE_TOKEN }}"
65
54
66
55
- name : " test and coverage"
67
56
run : " yarn run test:coverage"
73
62
run : " yarn run test:babel"
74
63
75
64
semantic-release :
76
- name : " semantic release "
65
+ name : " Semantic Release "
77
66
78
67
runs-on : " ubuntu-latest"
79
68
@@ -90,53 +79,34 @@ jobs:
90
79
GIT_AUTHOR_NAME : " GitHub Actions Shell"
91
80
EMAIL : " github-actions[bot]@users.noreply.github.com"
92
81
93
- - name : " Configure Container"
94
- env :
95
- GIT_USER_EMAIL : " ${{ secrets.GIT_USER_EMAIL }}"
96
- GIT_USER_USERNAME : " ${{ secrets.GIT_USER_USERNAME }}"
97
- run : |
98
- EMAIL=${GIT_USER_EMAIL:-"github-actions[bot]@users.noreply.github.com"}
99
- NAME=${GIT_USER_USERNAME:-"github-actions-shell"}
100
-
101
- git config --global user.email "${EMAIL}"
102
- git config --global user.name "${NAME}"
103
-
104
- - name : " Use Node.js 12.x"
105
- uses : " actions/setup-node@v2"
82
+
106
83
with :
107
- node- version : " 12.x "
84
+ version : 6
108
85
109
- - name : " Get yarn cache directory path"
110
- id : " yarn-cache-dir-path"
111
- run : " echo \" ::set-output name=dir::$(yarn config get cacheFolder)\" "
112
-
113
- - uses : " actions/cache@v2"
114
- id : " yarn-cache" # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
86
+ - name : " Use Node.js 14.x"
87
+ uses : " actions/setup-node@v2"
115
88
with :
116
- path : " ${{ steps.yarn-cache-dir-path.outputs.dir }}"
117
- key : " ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}"
118
- restore-keys : |
119
- ${{ runner.os }}-yarn-
120
-
121
- - name : " update yarn to v3"
122
- run : " yarn set version 3.0.1"
89
+ node-version : " 14.x"
90
+ cache : " pnpm"
123
91
124
- - name : " install"
125
- run : " yarn install --immutable"
92
+ - name : " Install packages"
93
+ run : " pnpm install --frozen-lockfile"
94
+ env :
95
+ NPM_TOKEN : " ${{ secrets.SEMANTIC_RELEASE_GITHUB_NPM_PACKAGE_TOKEN }}"
126
96
127
97
- name : " Semantic Release"
128
98
if : " success()"
129
99
env :
130
100
GITHUB_TOKEN : " ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}"
131
- NPM_TOKEN : " ${{ secrets.NPM_AUTH_TOKEN }}"
101
+ NPM_TOKEN : " ${{ secrets.SEMANTIC_RELEASE_GITHUB_NPM_PACKAGE_TOKEN }}"
132
102
GIT_AUTHOR_NAME : " github-actions-shell"
133
103
GIT_AUTHOR_EMAIL : " github-actions[bot]@users.noreply.github.com"
134
104
GIT_COMMITTER_NAME : " github-actions-shell"
135
105
GIT_COMMITTER_EMAIL : " github-actions[bot]@users.noreply.github.com"
136
- run : " yarn run multi-semantic-release"
106
+ run : " pnpm multi-semantic-release"
137
107
138
- yarn -lock-update :
139
- name : " yarn. lock update"
108
+ pnpm -lock-update :
109
+ name : " pnpm- lock.yaml update"
140
110
141
111
runs-on : " ubuntu-latest"
142
112
@@ -154,34 +124,23 @@ jobs:
154
124
GIT_AUTHOR_NAME : " GitHub Actions Shell"
155
125
EMAIL : " github-actions[bot]@users.noreply.github.com"
156
126
157
- - name : " Configure Container"
158
- env :
159
- GIT_USER_EMAIL : " ${{ secrets.GIT_USER_EMAIL }}"
160
- GIT_USER_USERNAME : " ${{ secrets.GIT_USER_USERNAME }}"
161
- run : |
162
- EMAIL=${GIT_USER_EMAIL:-"github-actions[bot]@users.noreply.github.com"}
163
- NAME=${GIT_USER_USERNAME:-"github-actions-shell"}
164
-
165
- git config --global user.email "${EMAIL}"
166
- git config --global user.name "${NAME}"
127
+
128
+ with :
129
+ version : 6
167
130
168
- - name : " Use Node.js 12 .x"
131
+ - name : " Use Node.js 14 .x"
169
132
uses : " actions/setup-node@v2"
170
133
with :
171
- node-version : " ^12.6.8"
172
-
173
- - name : " update yarn to v3"
174
- run : " yarn set version 3.0.1"
134
+ node-version : " 14.x"
135
+ registry-url : " ${{ env.registry_url }}"
175
136
176
- - name : " Update yarn.lock"
177
- run : " yarn --mode=update-lockfile"
178
- env :
179
- YARN_ENABLE_IMMUTABLE_INSTALLS : false
137
+ - name : " Update pnpm lock"
138
+ run : " pnpm install --no-frozen-lockfile"
180
139
181
140
- name : " Commit modified files"
182
141
uses :
" stefanzweifel/[email protected] "
183
142
with :
184
- commit_message : " chore: updated yarn. lock"
143
+ commit_message : " chore: updated pnpm- lock.yaml "
185
144
commit_author :
" prisis <[email protected] >"
186
145
commit_user_email :
" [email protected] "
187
146
commit_user_name : " prisis"
0 commit comments