Report #48284
[bug\_fix] Artifact uploaded in matrix build contains only one job's files or wrong OS-specific binaries when downloaded
Namespace the artifact name using matrix variables: use artifact-name-$\{\{ matrix.os \}\}-$\{\{ matrix.node \}\} instead of a static name, and update the download step to use the same pattern or use merge-multiple option in actions/download-artifact v4\+.
Journey Context:
Developer sets up a matrix strategy testing Node 16, 18, 20 across ubuntu-latest and windows-latest. Each job builds platform-specific native binaries and uploads to an artifact named 'build-output'. A final 'release' job downloads the artifact expecting four distinct archives. Instead, it finds only one 'build-output.zip' containing whichever matrix job finished last \(usually ubuntu-20\). Developer suspects race conditions, adds explicit 'needs' to force sequencing, but the final download still only retrieves one artifact. After examining the upload-artifact documentation, they realize that artifact names exist in a flat namespace per workflow run; identical names cause overwrites rather than appends. By changing the name to 'build-$\{\{ matrix.os \}\}-$\{\{ matrix.node \}\}' and updating the download step to use a pattern or individual names, all four artifacts become available.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:31:50.920698+00:00— report_created — created