Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upload-artifact action to use Node 20 #17470

Merged
merged 10 commits into from
May 13, 2024
99 changes: 43 additions & 56 deletions .github/workflows/build-ddev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: python -m build

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-artifacts
path: ddev/dist/*
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:

- name: Download Python artifacts
if: ${{ !startsWith(github.event.ref, 'refs/tags') }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-artifacts
path: ddev/dist
Expand Down Expand Up @@ -214,9 +214,9 @@ jobs:

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

Expand All @@ -235,19 +235,19 @@ jobs:

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

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

Expand Down Expand Up @@ -304,10 +304,11 @@ jobs:
OUTER

- name: Download staged standalone binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: staged-standalone-${{ runner.os }}
pattern: staged-standalone-${{ runner.os }}-*
path: ddev/archives
merge-multiple: true

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

- name: Upload standalone binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: standalone
path: ddev/archives/*
Expand All @@ -326,10 +327,11 @@ jobs:
run: rm -rf archives bin targets

- name: Download staged managed binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: staged-managed-${{ runner.os }}
pattern: staged-managed-${{ runner.os }}-*
path: ddev/archives
merge-multiple: true

- name: Extract staged managed binaries
run: ${{ steps.script-extract.outputs.script }}
Expand All @@ -349,10 +351,11 @@ jobs:
mv build/*/release/*/*.{exe,msi} installers

- name: Upload installers
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installers
name: installers-${{ runner.os }}
path: ddev/installers/*
if-no-files-found: error

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

# TODO: Use the next official release after 0.22.0 by removing these 2 blocks, uncommenting
# the following one, and changing the artifact name to reflect the next version. See:
# https://github.com/indygreg/apple-platform-rs/issues/82
#
# We use the artifact from the latest scheduled nightly job because installing
# with Cargo from scratch takes ~10 minutes
- name: Install rcodesign
uses: dawidd6/action-download-artifact@v2
with:
repo: indygreg/apple-platform-rs
workflow: rcodesign.yml
event: schedule
workflow_conclusion: success
name: exe-rcodesign-x86_64-apple-darwin
path: /usr/local/bin
search_artifacts: true
check_artifacts: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Finalize rcodesign
run: chmod +x /usr/local/bin/rcodesign

# - name: Install rcodesign
# env:
# ARCHIVE_NAME: "apple-codesign-0.22.0-x86_64-apple-darwin"
# run: >-
# curl -L
# "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/$ARCHIVE_NAME.tar.gz"
# |
# tar --strip-components=1 -xzf - -C /usr/local/bin "$ARCHIVE_NAME/rcodesign"
env:
ARCHIVE_NAME: "apple-codesign-0.27.0-x86_64-apple-darwin"
run: >-
curl -L
"https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.27.0/$ARCHIVE_NAME.tar.gz"
|
tar --strip-components=1 -xzf - -C /usr/local/bin "$ARCHIVE_NAME/rcodesign"

- name: Write credentials
env:
Expand Down Expand Up @@ -473,10 +454,11 @@ jobs:
OUTER

- name: Download staged standalone binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: staged-standalone-${{ runner.os }}
pattern: staged-standalone-${{ runner.os }}-*
path: ddev/archives
merge-multiple: true

- name: Extract staged standalone binaries
run: ${{ steps.script-extract.outputs.script }}
Expand All @@ -497,20 +479,21 @@ jobs:
done

- name: Upload standalone binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: standalone
name: standalone-${{ runner.os }}
path: ddev/archives/*
if-no-files-found: error

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

- name: Download staged managed binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: staged-managed-${{ runner.os }}
pattern: staged-managed-${{ runner.os }}-*
path: ddev/archives
merge-multiple: true

- name: Extract staged managed binaries
run: ${{ steps.script-extract.outputs.script }}
Expand Down Expand Up @@ -576,10 +559,11 @@ jobs:
"signed/${{ steps.pkg.outputs.path }}"

- name: Upload installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installers
name: installers-${{ runner.os }}
path: ddev/signed/${{ steps.pkg.outputs.path }}
if-no-files-found: error

publish:
name: Publish release
Expand All @@ -593,22 +577,25 @@ jobs:

steps:
- name: Download Python artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-artifacts
path: dist

- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
pattern: standalone-*
name: standalone
path: archives
merge-multiple: true

- name: Download installers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: installers
pattern: installers-*
path: installers
merge-multiple: true

- name: Push Python artifacts to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Build documentation
run: ddev -v docs build

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: documentation
path: site
Expand All @@ -72,7 +72,7 @@ jobs:
- build

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: documentation
path: site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/save-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: github-event
path: ${{ github.event_path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submit-traces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
id: download
with:
name: "${{ inputs.artifact-name }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-results-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
ref: "${{ env.BADGES_BRANCH }}"

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: test-results
path: test-results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:

- name: Upload captured traces
if: inputs.repo == 'core' && always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "${{ inputs.traces-artifact-name }}"
path: "${{ env.TRACE_CAPTURE_FILE }}"
Expand All @@ -259,7 +259,7 @@ jobs:

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results
path: "${{ env.TEST_RESULTS_BASE_DIR }}"
Expand Down