54
54
export STATUS_URL=$(echo ${row} | base64 --decode | jq -r ".status" | sed 's/https:\/\/api.github.com//')
55
55
gh api ${STATUS_URL} -f state=in_progress -H "Accept: application/vnd.github.flash-preview+json"
56
56
done
57
-
58
- - uses : actions/upload-artifact@v3
57
+ - uses : actions/upload-artifact@v4
59
58
with :
59
+ name : artifact-deployments
60
60
path : |-
61
61
workspace/gh-deployments.json
62
62
76
76
with :
77
77
cache : " npm"
78
78
79
- - uses : actions/download-artifact@v3
79
+ - uses : actions/download-artifact@v4
80
80
with :
81
81
path : workspace
82
+ merge-multiple : true
82
83
83
84
- name : Determine Heroku App
84
85
uses : " ./.github/actions/set-heroku-app-name"
@@ -106,8 +107,9 @@ jobs:
106
107
run : tar -cvf workspace/styles.tar assets/styles/
107
108
- name : Compress generated metadata
108
109
run : tar -cvf workspace/metadata.tar .generated/metadata/
109
- - uses : actions/upload-artifact@v3
110
+ - uses : actions/upload-artifact@v4
110
111
with :
112
+ name : artifact-prepare
111
113
path : |-
112
114
workspace/design-tokens.tar
113
115
workspace/styles.tar
@@ -128,9 +130,10 @@ jobs:
128
130
with :
129
131
cache : " npm"
130
132
131
- - uses : actions/download-artifact@v3
133
+ - uses : actions/download-artifact@v4
132
134
with :
133
135
path : workspace
136
+ merge-multiple : true
134
137
135
138
- name : Display structure of downloaded files
136
139
run : ls -R
@@ -151,8 +154,9 @@ jobs:
151
154
- name : Archive static Storybook
152
155
run : tar -czvf workspace/storybook.tar.gz .www/ Procfile config/nginx.conf.erb heroku-start.sh app.json
153
156
154
- - uses : actions/upload-artifact@v3
157
+ - uses : actions/upload-artifact@v4
155
158
with :
159
+ name : artifact-storybook
156
160
path : workspace/storybook.tar.gz
157
161
158
162
publish-storybook :
@@ -164,9 +168,10 @@ jobs:
164
168
- build-storybook
165
169
166
170
steps :
167
- - uses : actions/download-artifact@v3
171
+ - uses : actions/download-artifact@v4
168
172
with :
169
173
path : workspace
174
+ merge-multiple : true
170
175
171
176
- name : Display structure of downloaded files
172
177
run : ls -R
@@ -202,7 +207,7 @@ jobs:
202
207
echo ${PUBLISH_STORYBOOK_TO}
203
208
echo "=============================="
204
209
heroku buildpacks -a ${PUBLISH_STORYBOOK_TO} | grep "https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse" || heroku buildpacks:set https://github.com/salesforce-ux/heroku-buildpack-nginx.git#dse -a ${PUBLISH_STORYBOOK_TO}
205
- heroku builds:create --source-tar workspace/artifact/ storybook.tar.gz -a ${PUBLISH_STORYBOOK_TO}
210
+ heroku builds:create --source-tar workspace/storybook.tar.gz -a ${PUBLISH_STORYBOOK_TO}
206
211
207
212
- uses : tibdex/github-app-token@v1
208
213
id : get_installation_token
@@ -214,7 +219,7 @@ jobs:
214
219
env :
215
220
GITHUB_TOKEN : ${{ steps.get_installation_token.outputs.token }}
216
221
run : |-
217
- for row in $(jq -r '.[] | select(.url | contains("storybook")) | @base64' workspace/artifact/ gh-deployments.json); do
222
+ for row in $(jq -r '.[] | select(.url | contains("storybook")) | @base64' workspace/gh-deployments.json); do
218
223
export STATUS_URL=$(echo ${row} | base64 --decode | jq -r ".status" | sed 's/https:\/\/api.github.com//')
219
224
export SITE_URL=$(echo ${row} | base64 --decode | jq -r ".url")
220
225
gh api ${STATUS_URL} -f state=success -f environment_url=${SITE_URL} -H "Accept: application/vnd.github.ant-man-preview+json"
@@ -234,19 +239,21 @@ jobs:
234
239
cache : " npm"
235
240
node-version : " <=18.17.1"
236
241
237
- - uses : actions/download-artifact@v3
242
+ - uses : actions/download-artifact@v4
238
243
with :
239
244
path : workspace
245
+ merge-multiple : true
246
+
240
247
241
248
- name : Display structure of downloaded files
242
249
run : ls -R
243
250
working-directory : workspace
244
251
245
252
- uses : " ./.github/actions/copy-tokens-from-workspace"
246
253
- name : Decompress styles
247
- run : tar -xvf workspace/artifact/ styles.tar
254
+ run : tar -xvf workspace/styles.tar
248
255
- name : Decompress metadata
249
- run : tar -xvf workspace/artifact/ metadata.tar
256
+ run : tar -xvf workspace/metadata.tar
250
257
251
258
- run : npm ci
252
259
@@ -259,8 +266,10 @@ jobs:
259
266
run : |-
260
267
tar -cvf workspace/design-system-dist.tar .dist/
261
268
cd .dist && zip -r dist . && mv dist.zip ../workspace/ && cd ..
262
- - uses : actions/upload-artifact@v3
269
+
270
+ - uses : actions/upload-artifact@v4
263
271
with :
272
+ name : artifact-dist
264
273
path : |-
265
274
workspace/design-system-dist.tar
266
275
workspace/dist.zip
@@ -287,9 +296,10 @@ jobs:
287
296
- name : Display structure of downloaded files
288
297
run : ls -la
289
298
290
- - uses : actions/download-artifact@v3
299
+ - uses : actions/download-artifact@v4
291
300
with :
292
301
path : workspace
302
+ merge-multiple : true
293
303
294
304
- name : Display structure of downloaded files
295
305
run : ls -R
@@ -298,7 +308,7 @@ jobs:
298
308
- name : Decompress SLDS .dist
299
309
run : |-
300
310
mkdir -p .slds
301
- tar -xvf workspace/artifact/ design-system-dist.tar --directory .slds
311
+ tar -xvf workspace/design-system-dist.tar --directory .slds
302
312
303
313
- uses : actions/setup-node@v3
304
314
with :
@@ -325,7 +335,7 @@ jobs:
325
335
run : tar -czvf site-next.tar.gz .www/ Procfile config/nginx.conf.erb heroku-start.sh app.json
326
336
- name : Deploy to Heroku app
327
337
run : |-
328
- export HEROKU_APP_NAME=$(cat workspace/artifact/ heroku-app-name.txt)
338
+ export HEROKU_APP_NAME=$(cat workspace/heroku-app-name.txt)
329
339
echo "=============================="
330
340
echo ${HEROKU_APP_NAME}
331
341
echo "=============================="
@@ -354,9 +364,10 @@ jobs:
354
364
private_key : ${{ secrets.DSE_CI_APP_KEY }}
355
365
- uses : actions/checkout@v3
356
366
357
- - uses : actions/download-artifact@v3
367
+ - uses : actions/download-artifact@v4
358
368
with :
359
369
path : workspace
370
+ merge-multiple : true
360
371
361
372
- name : " Github: attach artifact to release"
362
373
env :
@@ -367,7 +378,7 @@ jobs:
367
378
gh release view ${VERSION_FROM_TAG} | grep ${VERSION_FROM_TAG}
368
379
369
380
if [ $? -eq 0 ]; then
370
- cp workspace/artifact/ dist.zip workspace/slds-${VERSION_FROM_TAG}.zip
381
+ cp workspace/dist.zip workspace/slds-${VERSION_FROM_TAG}.zip
371
382
echo "=============================="
372
383
echo "» Attaching artifact to release ${VERSION_FROM_TAG}"
373
384
gh release upload ${VERSION_FROM_TAG} workspace/slds-${VERSION_FROM_TAG}.zip#"SLDS ${VERSION_FROM_TAG}" --clobber
0 commit comments