Skip to content

Commit

Permalink
chore: Add merge step when creating release binaries
Browse files Browse the repository at this point in the history
The default behaviour of the upload-artifact action changed so that now
any subsequent pushes to the same named artifact will result in an error
as opposed to merging all results. This change adds an explicit merge
step to corral all the release binaries together in an artifact.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed May 1, 2024
1 parent 5dc73b1 commit ac25511
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Upload Release Archive
uses: actions/upload-artifact@v4
with:
name: release
name: clair-release
path: |
clair-${{ needs.config.outputs.version }}.tar.gz
changelog
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
uses: actions/download-artifact@v4
id: download
with:
name: release
name: clair-release
- name: Unpack
run: |
tar -xz -f ${{steps.download.outputs.download-path}}/clair-${{ needs.config.outputs.version }}.tar.gz --strip-components=1
Expand All @@ -148,15 +148,9 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: release
name: clairctl-${{matrix.goos}}-${{matrix.goarch}}
path: clairctl-${{matrix.goos}}-${{matrix.goarch}}
if-no-files-found: error
- name: Create Artifact on Failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: workspace-${{matrix.goos}}-${{matrix.goarch}}
path: ${{ github.workspace }}

release:
name: Release
Expand All @@ -170,7 +164,7 @@ jobs:
uses: actions/download-artifact@v4
id: download
with:
name: release
name: clair-release
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
Expand All @@ -189,7 +183,7 @@ jobs:
uses: actions/download-artifact@v4
id: download
with:
name: release
name: clair-release
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand Down Expand Up @@ -251,11 +245,11 @@ jobs:
- goos: darwin
goarch: 's390x'
steps:
- name: Fetch Archive
- name: Fetch Artifacts
uses: actions/download-artifact@v4
id: download
with:
name: release
pattern: clairctl-*
- name: Publish clairctl-${{matrix.goos}}-${{matrix.goarch}}
uses: actions/upload-release-asset@v1
env:
Expand Down

0 comments on commit ac25511

Please sign in to comment.