From 5d96e9f57f1914f1a2104cc81613b09566785e3c Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 17 Jul 2024 09:11:48 +0000 Subject: [PATCH] Avoid name clash when uploading artifacts from multiple platforms More recent versions of upload-artifact refuse to upload/merge artifacts with the same name. --- .github/workflows/release-brew.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-brew.yaml b/.github/workflows/release-brew.yaml index dc087af..3289979 100644 --- a/.github/workflows/release-brew.yaml +++ b/.github/workflows/release-brew.yaml @@ -139,15 +139,13 @@ jobs: echo "::set-output name=file_name::$file_name" - name: Upload bottles as artifact - uses: actions/upload-artifact@main + uses: actions/upload-artifact@v4 with: - name: bottles + name: bottle-${{ matrix.os }} path: '*.bottle.*' - name: Upload release binary uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} asset_path: ${{ steps.get_package_path.outputs.bottle }} @@ -162,7 +160,7 @@ jobs: steps: - uses: actions/download-artifact@v3 with: - name: bottles + pattern: bottle-* - name: Authenticate GitHub workflow to AWS uses: aws-actions/configure-aws-credentials@v4 @@ -192,6 +190,6 @@ jobs: - name: Generate and merge bottle DSL run: | - brew bottle --merge --write $(ls *.json) + brew bottle --merge --write $(ls bottle-*/*.json) cd $(brew --repo ${{ env.TAP }}) git push fork-repo bump-${{ env.FORMULA }}-${{ env.VERSION }}