Skip to content

Commit

Permalink
Upgrade to actions/upload-artifact@v4
Browse files Browse the repository at this point in the history
This changeset upgrades the composit action to use upload-artifact@v4,
which could be considered a breaking change:

https://github.com/actions/upload-artifact?tab=readme-ov-file#breaking-changes

Specifically, artifact upload is now immutable and will fail if an
artifact is uploading using the name of one that is already created.

Fortunately, this shouldn't be a problem for most consumers of
the action-autobuild package, as the platfom name is baked into
autobuild package and resulting artifact names.
  • Loading branch information
bennettgoble committed Jan 5, 2024
1 parent 3ce7027 commit 73ddae0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,29 @@ jobs:

- uses: ./
with:
artifact-name: autobuild-${{ matrix.os }}
checkout: false

- shell: bash
run: rm -rf stage

- uses: ./
with:
artifact-name: autobuild-scm-${{ matrix.os }}
checkout: false
file: autobuild-scm.xml

# Test git-based autobuild install
- uses: ./
with:
artifact-name: autobuild-git-${{ matrix.os }}
autobuild-version: main
checkout: false

# Test alternative compression-format
- uses: ./
with:
artifact-name: autobuild-tbz2-${{ matrix.os }}
archive-format: tbz2
checkout: false
- name: Check bz2 package
Expand All @@ -58,8 +62,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.10"

- uses: ./
with:
artifact-name: autobuild-py310-${{ matrix.os }}
setup-python: false
- name: Check python version
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ inputs:
configuration:
type: string
description: Autobuild configuration
artifact-name:
type: string
description: Name of artifact to upload, defaults to the autobuild package name

outputs:
package-name:
Expand Down Expand Up @@ -238,9 +241,9 @@ runs:
echo "package_name=$package_name" >> $GITHUB_OUTPUT
echo "package_platform=$package_platform" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.results.outputs.package_basename_no_ext }}
name: ${{ inputs.artifact-name || steps.results.outputs.package_basename_no_ext }}
path: |
${{ steps.results.outputs.package_filename }}
autobuild-results.json
Expand Down

0 comments on commit 73ddae0

Please sign in to comment.