From 707b97c9a08f4f68e8be89b1390af96fd045fcec Mon Sep 17 00:00:00 2001 From: Damon Barry Date: Wed, 6 Nov 2024 11:22:45 -0800 Subject: [PATCH] Update upload/download-artifacts action to v4 --- .github/workflows/packages.yaml | 4 ++-- .github/workflows/test.yaml | 6 +++--- ci/e2e-tests/test-run.sh | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml index 1a02b7b8..19160049 100644 --- a/.github/workflows/packages.yaml +++ b/.github/workflows/packages.yaml @@ -78,7 +78,7 @@ jobs: os_package="$(sed -e 's@[:/]@-@g' <<< "$os_package")" echo "artifact-name=packages_${os_package}_${{ matrix.arch }}" >> $GITHUB_OUTPUT - name: 'Upload' - uses: 'actions/upload-artifact@v3' + uses: 'actions/upload-artifact@v4' with: name: "${{ steps.generate-artifact-properties.outputs.artifact-name }}" path: 'packages' @@ -113,7 +113,7 @@ jobs: build-info: true - name: 'Upload' - uses: 'actions/upload-artifact@v3' + uses: 'actions/upload-artifact@v4' with: name: 'packages_snap_${{ matrix.runner.arch }}' path: '${{ steps.snapcraft.outputs.snap }}' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 02ffe4e9..b0fbb339 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -54,7 +54,7 @@ jobs: esac echo "target_dir=$target_dir" >> $GITHUB_OUTPUT - name: 'Upload' - uses: 'actions/upload-artifact@v3' + uses: 'actions/upload-artifact@v4' with: name: "${{ steps.generate-artifact-properties.outputs.artifact-name }}" path: | @@ -113,7 +113,7 @@ jobs: echo "target_dir=$target_dir" >> $GITHUB_OUTPUT - name: 'Download' id: 'download-artifact' - uses: 'actions/download-artifact@v3' + uses: 'actions/download-artifact@v4' with: name: "${{ steps.generate-artifact-properties.outputs.artifact-name }}" path: 'target/debug' @@ -165,7 +165,7 @@ jobs: echo "target_dir=$target_dir" >> $GITHUB_OUTPUT - name: 'Download' id: 'download-artifact' - uses: 'actions/download-artifact@v3' + uses: 'actions/download-artifact@v4' with: name: "${{ steps.generate-artifact-properties.outputs.artifact-name }}" path: 'target/debug' diff --git a/ci/e2e-tests/test-run.sh b/ci/e2e-tests/test-run.sh index 1533c8dd..067cc87a 100755 --- a/ci/e2e-tests/test-run.sh +++ b/ci/e2e-tests/test-run.sh @@ -31,13 +31,17 @@ get_package() { return fi - # The download-artifact action does not have a way to download artifacts from other workflows. + # The download-artifact@v3 action does not have a way to download artifacts from other workflows. # Ref: https://github.com/actions/download-artifact/issues/3 # # So instead we use the GitHub API ourselves. # # It would be nice to use the v4 graphql API and get the artifact URL in one shot, # but it doesn't appear to support artifacts. + # + # The download-artifact@v4 action now supports downloading artifacts from other workflows, but + # we'd need to evaluate it. See + # https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories github_curl() { if [ -n "${GITHUB_PAT:-}" ]; then