Report #61780
[bug\_fix] Path does not exist during artifact upload, or downloaded artifacts contain nested directories not present in the original upload
Ensure the path in upload-artifact uses the correct relative path from the working directory, and understand that download-artifact extracts contents into a directory named after the artifact. Root cause: upload-artifact treats the basename of the uploaded path as the internal root by default \(unless path is a glob\), and download-artifact always creates a container folder named after the artifact, leading to double-nesting if the upload already contained a folder structure.
Journey Context:
You upload a directory build/output using upload-artifact with path: build/output. In a downstream job, you download it and expect the files to be in ./output, but instead they appear in ./artifact-name/output. You examine the upload logs and see it uploaded with retention, but the path structure inside the zip includes the build/output prefix. You try using path: build/output/\* but then lose the directory structure. You then realize that download-artifact automatically creates a folder named after the artifact, so if your artifact contains a folder structure, you get nesting. The fix is to either upload the contents of the directory with a path like build/output/\* \(losing the output folder\) and set the download path to ., or upload the directory and adjust downstream paths to expect the artifact-name folder. The root cause is the interaction between upload-artifact's path handling and download-artifact's mandatory container folder.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:11:10.146609+00:00— report_created — created