16
16
- uses : actions/setup-node@v2
17
17
with :
18
18
node-version : lts/*
19
- - uses : actions/cache@v2
20
- id : cache
21
- env :
22
- CACHE_NAME : cache-node-modules
23
- with :
24
- path : |
25
- ~/.npm
26
- ./dist
27
- ./node_modules
28
- ./packages/*/dist
29
- ./packages/*/node_modules
30
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
31
- - name : Install Dependencies
32
- if : steps.cache.outputs.cache-hit != 'true'
33
- run : |
34
- npm install
35
- npm run --if-present build
19
+ - uses : ipfs/aegir/actions/cache-node-modules@master
36
20
- run : npm run --if-present lint
37
21
- run : npm run --if-present dep-check
38
22
49
33
- uses : actions/setup-node@v2
50
34
with :
51
35
node-version : ${{ matrix.node }}
52
- - uses : actions/cache@v2
53
- id : cache
54
- env :
55
- CACHE_NAME : cache-node-modules
56
- with :
57
- path : |
58
- ~/.npm
59
- ./dist
60
- ./node_modules
61
- ./packages/*/dist
62
- ./packages/*/node_modules
63
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
64
- - name : Install Dependencies
65
- if : steps.cache.outputs.cache-hit != 'true'
66
- run : |
67
- npm install
68
- npm run --if-present build
36
+ - uses : ipfs/aegir/actions/cache-node-modules@master
69
37
- run : npm run --if-present test:node
70
38
- uses : codecov/codecov-action@v1
71
39
77
45
- uses : actions/setup-node@v2
78
46
with :
79
47
node-version : lts/*
80
- - uses : actions/cache@v2
81
- id : cache
82
- env :
83
- CACHE_NAME : cache-node-modules
84
- with :
85
- path : |
86
- ~/.npm
87
- ./dist
88
- ./node_modules
89
- ./packages/*/dist
90
- ./packages/*/node_modules
91
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
92
- - name : Install Dependencies
93
- if : steps.cache.outputs.cache-hit != 'true'
94
- run : |
95
- npm install
96
- npm run --if-present build
48
+ - uses : ipfs/aegir/actions/cache-node-modules@master
97
49
- run : npm run --if-present test:chrome
98
50
99
51
test-chrome-webworker :
@@ -104,23 +56,7 @@ jobs:
104
56
- uses : actions/setup-node@v2
105
57
with :
106
58
node-version : lts/*
107
- - uses : actions/cache@v2
108
- id : cache
109
- env :
110
- CACHE_NAME : cache-node-modules
111
- with :
112
- path : |
113
- ~/.npm
114
- ./dist
115
- ./node_modules
116
- ./packages/*/dist
117
- ./packages/*/node_modules
118
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
119
- - name : Install Dependencies
120
- if : steps.cache.outputs.cache-hit != 'true'
121
- run : |
122
- npm install
123
- npm run --if-present build
59
+ - uses : ipfs/aegir/actions/cache-node-modules@master
124
60
- run : npm run --if-present test:chrome-webworker
125
61
126
62
test-firefox :
@@ -131,23 +67,7 @@ jobs:
131
67
- uses : actions/setup-node@v2
132
68
with :
133
69
node-version : lts/*
134
- - uses : actions/cache@v2
135
- id : cache
136
- env :
137
- CACHE_NAME : cache-node-modules
138
- with :
139
- path : |
140
- ~/.npm
141
- ./dist
142
- ./node_modules
143
- ./packages/*/dist
144
- ./packages/*/node_modules
145
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
146
- - name : Install Dependencies
147
- if : steps.cache.outputs.cache-hit != 'true'
148
- run : |
149
- npm install
150
- npm run --if-present build
70
+ - uses : ipfs/aegir/actions/cache-node-modules@master
151
71
- run : npm run --if-present test:firefox
152
72
153
73
test-firefox-webworker :
@@ -158,23 +78,7 @@ jobs:
158
78
- uses : actions/setup-node@v2
159
79
with :
160
80
node-version : lts/*
161
- - uses : actions/cache@v2
162
- id : cache
163
- env :
164
- CACHE_NAME : cache-node-modules
165
- with :
166
- path : |
167
- ~/.npm
168
- ./dist
169
- ./node_modules
170
- ./packages/*/dist
171
- ./packages/*/node_modules
172
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
173
- - name : Install Dependencies
174
- if : steps.cache.outputs.cache-hit != 'true'
175
- run : |
176
- npm install
177
- npm run --if-present build
81
+ - uses : ipfs/aegir/actions/cache-node-modules@master
178
82
- run : npm run --if-present test:firefox-webworker
179
83
180
84
test-electron-main :
@@ -185,23 +89,7 @@ jobs:
185
89
- uses : actions/setup-node@v2
186
90
with :
187
91
node-version : lts/*
188
- - uses : actions/cache@v2
189
- id : cache
190
- env :
191
- CACHE_NAME : cache-node-modules
192
- with :
193
- path : |
194
- ~/.npm
195
- ./dist
196
- ./node_modules
197
- ./packages/*/dist
198
- ./packages/*/node_modules
199
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
200
- - name : Install Dependencies
201
- if : steps.cache.outputs.cache-hit != 'true'
202
- run : |
203
- npm install
204
- npm run --if-present build
92
+ - uses : ipfs/aegir/actions/cache-node-modules@master
205
93
- run : npx xvfb-maybe npm run --if-present test:electron-main
206
94
207
95
test-electron-renderer :
@@ -212,23 +100,7 @@ jobs:
212
100
- uses : actions/setup-node@v2
213
101
with :
214
102
node-version : lts/*
215
- - uses : actions/cache@v2
216
- id : cache
217
- env :
218
- CACHE_NAME : cache-node-modules
219
- with :
220
- path : |
221
- ~/.npm
222
- ./dist
223
- ./node_modules
224
- ./packages/*/dist
225
- ./packages/*/node_modules
226
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
227
- - name : Install Dependencies
228
- if : steps.cache.outputs.cache-hit != 'true'
229
- run : |
230
- npm install
231
- npm run --if-present build
103
+ - uses : ipfs/aegir/actions/cache-node-modules@master
232
104
- run : npx xvfb-maybe npm run --if-present test:electron-renderer
233
105
234
106
release :
@@ -242,30 +114,12 @@ jobs:
242
114
- uses : actions/setup-node@v2
243
115
with :
244
116
node-version : lts/*
245
- - uses : actions/cache@v2
246
- id : cache
247
- env :
248
- CACHE_NAME : cache-node-modules
117
+ - uses : ipfs/aegir/actions/cache-node-modules@master
118
+ - uses : ipfs/aegir/actions/docker-login@master
249
119
with :
250
- path : |
251
- ~/.npm
252
- ./dist
253
- ./node_modules
254
- ./packages/*/dist
255
- ./packages/*/node_modules
256
- key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
257
- - name : Install Dependencies
258
- if : steps.cache.outputs.cache-hit != 'true'
259
- run : |
260
- npm install
261
- npm run --if-present build
262
- - run : |
263
- if [[ -n "${DOCKER_TOKEN}" ]] && [[ -n "${DOCKER_USERNAME}" ]]; then
264
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
265
- fi
266
- npm run --if-present release
120
+ docker-token : ${{ secrets.DOCKER_USERNAME }}
121
+ docker-username : ${{ secrets.DOCKER_USERNAME }}
122
+ - run : npm run --if-present release
267
123
env :
268
124
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
269
125
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
270
- DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
271
- DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
0 commit comments