Report #90774
[bug\_fix] Artifact upload/download v4 incompatibility or duplicate name error
Ensure artifact names are unique across matrix instances by appending matrix values to the name \(e.g., \`artifact-$\{\{ matrix.os \}\}\`\). Upgrade both \`upload-artifact\` and \`download-artifact\` to v4 simultaneously. For downloading multiple artifacts, use the \`pattern\` and \`merge-multiple\` inputs introduced in v4.
Journey Context:
Developer upgrades \`actions/upload-artifact\` to v4 to utilize the improved performance. Their workflow runs a matrix strategy across Node 18, 20, and 22, uploading test results with \`name: test-results\` in each matrix instance. On the first matrix instance \(Node 18\), the upload succeeds. On Node 20, the upload step fails with: 'Failed to CreateArtifact: Received non-retryable error: Failed to create artifact. An artifact with this name already exists.' Developer checks the v4 release notes and realizes that unlike v3 \(which overwrote artifacts with the same name\), v4 requires artifact names to be unique within a workflow run. They modify the upload step to use \`name: test-results-$\{\{ matrix.node-version \}\}\`. The upload now works for all matrix instances. However, the downstream job that downloads these artifacts fails because it's still using \`actions/download-artifact@v3\` which cannot read the v4 artifact format. The error is 'Unable to find any artifacts'. Developer upgrades to \`download-artifact@v4\`, but now needs to download multiple artifacts. They discover the v4 syntax changes: instead of downloading by name multiple times, they use \`pattern: test-results-\*\` and \`merge-multiple: true\` to download all Node version results into the same directory, or \`path\` to separate them.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:57:29.000985+00:00— report_created — created