GitHub Actions actions/upload-artifact "No files were found" (v4)
actions/upload-artifact@v4 resolves the path input as a glob relative to the workspace. When the glob matches no files - wrong directory, a build that did not run, or a typo - v4 errors (or warns) that nothing was found.
What this error means
An upload-artifact step reports that no files were found at the provided path, and downstream jobs have no artifact to download.
Error: No files were found with the provided path: dist/**. No artifacts will be uploaded.Common causes
Build output missing or in another directory
The producing step failed, ran in a different working-directory, or wrote output to a path the glob does not cover.
Glob does not match
A trailing-slash, case, or relative-path mistake makes the pattern match nothing.
How to fix it
Point the path at the real output and fail loudly
- Confirm the build step produced files and where.
- Set path to the correct glob (relative to the workspace).
- Set if-no-files-found: error to fail fast instead of silently skipping.
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
if-no-files-found: errorHow to prevent it
- Set if-no-files-found: error so missing output fails the job.
- Verify the producing step ran in the expected working-directory.