Skip to content

Commit af01b39

Browse files
authored
Update upload-artifact action to use Node 20 (#17470)
* Update upload-artifact action to use Node 20 * Update download-artifact to match upload-artifact * unique artifact names following the way hatch does it * Linux standalone archives also use unique names * fixes * Newer rcodesign installation based on hatch * unique windows binary upload * fix macos installer upload * more misc fixes
1 parent 6acc5c6 commit af01b39

File tree

6 files changed

+50
-63
lines changed

6 files changed

+50
-63
lines changed

.github/workflows/build-ddev.yml

Lines changed: 43 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: python -m build
4646

4747
- name: Upload artifacts
48-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: python-artifacts
5151
path: ddev/dist/*
@@ -142,7 +142,7 @@ jobs:
142142
143143
- name: Download Python artifacts
144144
if: ${{ !startsWith(github.event.ref, 'refs/tags') }}
145-
uses: actions/download-artifact@v3
145+
uses: actions/download-artifact@v4
146146
with:
147147
name: python-artifacts
148148
path: ddev/dist
@@ -214,9 +214,9 @@ jobs:
214214

215215
- name: Upload staged managed archive
216216
if: runner.os != 'Linux'
217-
uses: actions/upload-artifact@v3
217+
uses: actions/upload-artifact@v4
218218
with:
219-
name: staged-managed-${{ runner.os }}
219+
name: staged-managed-${{ runner.os }}-${{ matrix.job.target }}
220220
path: ddev/packaging/*
221221
if-no-files-found: error
222222

@@ -235,19 +235,19 @@ jobs:
235235

236236
- name: Upload staged standalone archive
237237
if: runner.os != 'Linux'
238-
uses: actions/upload-artifact@v3
238+
uses: actions/upload-artifact@v4
239239
with:
240-
name: staged-standalone-${{ runner.os }}
240+
name: staged-standalone-${{ runner.os }}-${{ matrix.job.target }}
241241
path: ddev/packaging/*
242242
if-no-files-found: error
243243

244244
# There are no installers nor extra steps like signing for Linux so we
245245
# can upload directly at this point
246246
- name: Upload standalone archive
247247
if: runner.os == 'Linux'
248-
uses: actions/upload-artifact@v3
248+
uses: actions/upload-artifact@v4
249249
with:
250-
name: standalone
250+
name: standalone-${{ matrix.job.target }}
251251
path: ddev/packaging/*
252252
if-no-files-found: error
253253

@@ -304,10 +304,11 @@ jobs:
304304
OUTER
305305
306306
- name: Download staged standalone binaries
307-
uses: actions/download-artifact@v3
307+
uses: actions/download-artifact@v4
308308
with:
309-
name: staged-standalone-${{ runner.os }}
309+
pattern: staged-standalone-${{ runner.os }}-*
310310
path: ddev/archives
311+
merge-multiple: true
311312

312313
- name: Extract staged standalone binaries
313314
run: ${{ steps.script-extract.outputs.script }}
@@ -316,7 +317,7 @@ jobs:
316317
run: ${{ steps.script-prepare.outputs.script }}
317318

318319
- name: Upload standalone binaries
319-
uses: actions/upload-artifact@v3
320+
uses: actions/upload-artifact@v4
320321
with:
321322
name: standalone
322323
path: ddev/archives/*
@@ -326,10 +327,11 @@ jobs:
326327
run: rm -rf archives bin targets
327328

328329
- name: Download staged managed binaries
329-
uses: actions/download-artifact@v3
330+
uses: actions/download-artifact@v4
330331
with:
331-
name: staged-managed-${{ runner.os }}
332+
pattern: staged-managed-${{ runner.os }}-*
332333
path: ddev/archives
334+
merge-multiple: true
333335

334336
- name: Extract staged managed binaries
335337
run: ${{ steps.script-extract.outputs.script }}
@@ -349,10 +351,11 @@ jobs:
349351
mv build/*/release/*/*.{exe,msi} installers
350352
351353
- name: Upload installers
352-
uses: actions/upload-artifact@v3
354+
uses: actions/upload-artifact@v4
353355
with:
354-
name: installers
356+
name: installers-${{ runner.os }}
355357
path: ddev/installers/*
358+
if-no-files-found: error
356359

357360
macos-packaging:
358361
name: Build macOS installer and sign/notarize artifacts
@@ -375,36 +378,14 @@ jobs:
375378
- name: Install PyOxidizer ${{ env.PYOXIDIZER_VERSION }}
376379
run: pip install pyoxidizer==${{ env.PYOXIDIZER_VERSION }}
377380

378-
# TODO: Use the next official release after 0.22.0 by removing these 2 blocks, uncommenting
379-
# the following one, and changing the artifact name to reflect the next version. See:
380-
# https://github.com/indygreg/apple-platform-rs/issues/82
381-
#
382-
# We use the artifact from the latest scheduled nightly job because installing
383-
# with Cargo from scratch takes ~10 minutes
384381
- name: Install rcodesign
385-
uses: dawidd6/action-download-artifact@v2
386-
with:
387-
repo: indygreg/apple-platform-rs
388-
workflow: rcodesign.yml
389-
event: schedule
390-
workflow_conclusion: success
391-
name: exe-rcodesign-x86_64-apple-darwin
392-
path: /usr/local/bin
393-
search_artifacts: true
394-
check_artifacts: true
395-
github_token: ${{ secrets.GITHUB_TOKEN }}
396-
397-
- name: Finalize rcodesign
398-
run: chmod +x /usr/local/bin/rcodesign
399-
400-
# - name: Install rcodesign
401-
# env:
402-
# ARCHIVE_NAME: "apple-codesign-0.22.0-x86_64-apple-darwin"
403-
# run: >-
404-
# curl -L
405-
# "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/$ARCHIVE_NAME.tar.gz"
406-
# |
407-
# tar --strip-components=1 -xzf - -C /usr/local/bin "$ARCHIVE_NAME/rcodesign"
382+
env:
383+
ARCHIVE_NAME: "apple-codesign-0.27.0-x86_64-apple-darwin"
384+
run: >-
385+
curl -L
386+
"https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.27.0/$ARCHIVE_NAME.tar.gz"
387+
|
388+
tar --strip-components=1 -xzf - -C /usr/local/bin "$ARCHIVE_NAME/rcodesign"
408389
409390
- name: Write credentials
410391
env:
@@ -473,10 +454,11 @@ jobs:
473454
OUTER
474455
475456
- name: Download staged standalone binaries
476-
uses: actions/download-artifact@v3
457+
uses: actions/download-artifact@v4
477458
with:
478-
name: staged-standalone-${{ runner.os }}
459+
pattern: staged-standalone-${{ runner.os }}-*
479460
path: ddev/archives
461+
merge-multiple: true
480462

481463
- name: Extract staged standalone binaries
482464
run: ${{ steps.script-extract.outputs.script }}
@@ -497,20 +479,21 @@ jobs:
497479
done
498480
499481
- name: Upload standalone binaries
500-
uses: actions/upload-artifact@v3
482+
uses: actions/upload-artifact@v4
501483
with:
502-
name: standalone
484+
name: standalone-${{ runner.os }}
503485
path: ddev/archives/*
504486
if-no-files-found: error
505487

506488
- name: Reset artifact directories
507489
run: rm -rf archives bin notarize-bin
508490

509491
- name: Download staged managed binaries
510-
uses: actions/download-artifact@v3
492+
uses: actions/download-artifact@v4
511493
with:
512-
name: staged-managed-${{ runner.os }}
494+
pattern: staged-managed-${{ runner.os }}-*
513495
path: ddev/archives
496+
merge-multiple: true
514497

515498
- name: Extract staged managed binaries
516499
run: ${{ steps.script-extract.outputs.script }}
@@ -576,10 +559,11 @@ jobs:
576559
"signed/${{ steps.pkg.outputs.path }}"
577560
578561
- name: Upload installer
579-
uses: actions/upload-artifact@v3
562+
uses: actions/upload-artifact@v4
580563
with:
581-
name: installers
564+
name: installers-${{ runner.os }}
582565
path: ddev/signed/${{ steps.pkg.outputs.path }}
566+
if-no-files-found: error
583567

584568
publish:
585569
name: Publish release
@@ -593,22 +577,25 @@ jobs:
593577

594578
steps:
595579
- name: Download Python artifacts
596-
uses: actions/download-artifact@v3
580+
uses: actions/download-artifact@v4
597581
with:
598582
name: python-artifacts
599583
path: dist
600584

601585
- name: Download binaries
602-
uses: actions/download-artifact@v3
586+
uses: actions/download-artifact@v4
603587
with:
588+
pattern: standalone-*
604589
name: standalone
605590
path: archives
591+
merge-multiple: true
606592

607593
- name: Download installers
608-
uses: actions/download-artifact@v3
594+
uses: actions/download-artifact@v4
609595
with:
610-
name: installers
596+
pattern: installers-*
611597
path: installers
598+
merge-multiple: true
612599

613600
- name: Push Python artifacts to PyPI
614601
uses: pypa/gh-action-pypi-publish@v1.8.6

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Build documentation
6060
run: ddev -v docs build
6161

62-
- uses: actions/upload-artifact@v2
62+
- uses: actions/upload-artifact@v4
6363
with:
6464
name: documentation
6565
path: site
@@ -72,7 +72,7 @@ jobs:
7272
- build
7373

7474
steps:
75-
- uses: actions/download-artifact@v2
75+
- uses: actions/download-artifact@v4
7676
with:
7777
name: documentation
7878
path: site

.github/workflows/save-event.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Upload
18-
uses: actions/upload-artifact@v3
18+
uses: actions/upload-artifact@v4
1919
with:
2020
name: github-event
2121
path: ${{ github.event_path }}

.github/workflows/submit-traces.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333

34-
- uses: actions/download-artifact@v3
34+
- uses: actions/download-artifact@v4
3535
id: download
3636
with:
3737
name: "${{ inputs.artifact-name }}"

.github/workflows/test-results-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
ref: "${{ env.BADGES_BRANCH }}"
2323

24-
- uses: actions/download-artifact@v3
24+
- uses: actions/download-artifact@v4
2525
with:
2626
name: test-results
2727
path: test-results

.github/workflows/test-target.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244

245245
- name: Upload captured traces
246246
if: inputs.repo == 'core' && always()
247-
uses: actions/upload-artifact@v3
247+
uses: actions/upload-artifact@v4
248248
with:
249249
name: "${{ inputs.traces-artifact-name }}"
250250
path: "${{ env.TRACE_CAPTURE_FILE }}"
@@ -259,7 +259,7 @@ jobs:
259259
260260
- name: Upload test results
261261
if: always()
262-
uses: actions/upload-artifact@v3
262+
uses: actions/upload-artifact@v4
263263
with:
264264
name: test-results
265265
path: "${{ env.TEST_RESULTS_BASE_DIR }}"

0 commit comments

Comments
 (0)