From 73ddae0d49f7d2b197b27f652e710be39b32a269 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Fri, 5 Jan 2024 15:23:57 -0800 Subject: [PATCH] Upgrade to actions/upload-artifact@v4 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. --- .github/workflows/test.yaml | 6 ++++++ action.yaml | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 211a692..7de7777 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,6 +29,7 @@ jobs: - uses: ./ with: + artifact-name: autobuild-${{ matrix.os }} checkout: false - shell: bash @@ -36,18 +37,21 @@ jobs: - 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 @@ -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 diff --git a/action.yaml b/action.yaml index 71214cb..7cc88a9 100644 --- a/action.yaml +++ b/action.yaml @@ -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: @@ -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