Report #15172
[bug\_fix] "Artifact already exists" error or only one artifact visible in the UI despite matrix build generating multiple outputs
Make the artifact name unique per matrix combination by interpolating matrix variables into the name parameter, e.g., \`name: build-$\{\{ matrix.os \}\}-$\{\{ matrix.node-version \}\}\`
Journey Context:
Developer sets up a matrix strategy testing their application on ubuntu-latest and windows-latest, each with Node 16 and 18 \(4 combinations total\). Each job builds the application and uploads the dist folder using \`actions/upload-artifact\` with a static name: \`name: build-output\` and path: \`dist/\`. The workflow runs, but only one artifact appears in the Actions summary, or they see error messages like "Failed to CreateArtifact: Artifact already exists". They investigate and realize that all four matrix jobs are running in parallel and attempting to upload artifacts with the exact same name. Since artifact names must be unique within a workflow run, they overwrite each other or fail. The developer changes the name to \`name: build-output-$\{\{ matrix.os \}\}-$\{\{ matrix.node-version \}\}\`, resulting in four distinct artifacts: build-output-ubuntu-latest-16, build-output-ubuntu-latest-18, build-output-windows-latest-16, and build-output-windows-latest-18. They can then download specific artifacts in downstream jobs using the matrix variables to match.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:20:35.994018+00:00— report_created — created