Report #50324
[bug\_fix] Matrix jobs overwriting each other's artifacts causing missing or corrupted downloads
Templatize the artifact name with matrix variables \(e.g., \`artifact-$\{\{ matrix.os \}\}-$\{\{ matrix.node \}\}\`\) to ensure uniqueness per job, or when using \`actions/download-artifact@v4\`, use \`merge-multiple: true\` with a pattern to retrieve all artifacts with a shared prefix.
Journey Context:
You configure a matrix strategy across three platforms: Linux, macOS, and Windows, building native binaries in each. Each job uploads the binary using \`actions/upload-artifact\` with \`name: build-output\`. The workflow completes successfully for all three jobs. You then run a download step expecting to retrieve all three binaries, or you look in the Actions UI under Artifacts, and see only one "build-output" artifact, typically the last one that finished. You check the individual job logs and see all three uploads reported success with no warnings. You suspect a race condition. You research the artifact action documentation and discover that artifact names act as unique identifiers within a workflow run. In \`actions/upload-artifact@v4\`, uploading multiple artifacts with the same name to the same workflow run causes them to overwrite each other \(or fail, depending on configuration\), whereas v3 allowed multiple uploads to the same name but created confusing bundles. You realize each matrix job is uploading to the same name, and only the last write persists. You fix this by changing the name to \`build-output-$\{\{ matrix.os \}\}-$\{\{ matrix.node-version \}\}\`, ensuring each matrix combination has a unique identifier, allowing all artifacts to coexist.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:56:52.527672+00:00— report_created — created