Skip to content

Commit

Permalink
Update upload/download-artifacts action to v4 (#640)
Browse files Browse the repository at this point in the history
The `download-artifact@v3` and `upload-artifact@v3` GitHub actions will soon be deprecated. This change updates our workflows to use the v4 versions.
  • Loading branch information
damonbarry authored Nov 7, 2024
1 parent 2a8d851 commit 005a4ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}'
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion ci/e2e-tests/test-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 005a4ea

Please sign in to comment.