Skip to content

Conversation

mcarbonne
Copy link
Contributor

CI is currently broken because of a breaking change in upload-artifact@v4.
Unlike earlier versions of upload-artifact, uploading to the same artifact via multiple jobs is not supported with v4.

Documentation (https://github.com/actions/upload-artifact):

In matrix scenarios, be careful to not accidentally upload to the same artifact, or else you will encounter conflict errors. It would be best to name the artifact with a prefix or suffix from the matrix:

jobs:
  upload:
    name: Generate Build Artifacts

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        version: [a, b, c]

    runs-on: ${{ matrix.os }}

    steps:
    - name: Build
      run: ./some-script --version=${{ matrix.version }} > my-binary
    - name: Upload
      uses: actions/upload-artifact@v4
      with:
        name: binary-${{ matrix.os }}-${{ matrix.version }}
        path: my-binary

This will result in artifacts like: binary-ubuntu-latest-a, binary-windows-latest-b, and so on.

I did the same fix in my other PR #557 (comment) but as this isn't related, I opened another dedicated PR.

@AnalogJ
Copy link
Owner

AnalogJ commented Apr 10, 2025

awesome work, thanks for the PR! 🥳

@AnalogJ AnalogJ merged commit 192ae40 into AnalogJ:master Apr 10, 2025
@mcarbonne mcarbonne deleted the fix_ci branch June 9, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants