Skip to content

Commit

Permalink
Avoid name clash when uploading artifacts from multiple platforms
Browse files Browse the repository at this point in the history
More recent versions of upload-artifact refuse to upload/merge artifacts
with the same name.
  • Loading branch information
tautschnig committed Jul 17, 2024
1 parent 9e835cd commit 2c968b5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release-brew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 2c968b5

Please sign in to comment.