actions/upload-artifact "No files were found with the provided path" in CI
upload-artifact resolves the path glob at upload time. If nothing matches, it warns "No files were found with the provided path" and, depending on if-no-files-found, warns, errors, or silently uploads nothing. The build step that should have produced those files usually failed or wrote elsewhere.
What this error means
The upload step logs "No files were found with the provided path: <path>. No artifacts will be uploaded." (default warn) or fails when if-no-files-found: error is set.
Warning: No files were found with the provided path: dist/. No artifacts will be uploaded.Common causes
The path is wrong or relative to the wrong directory
The glob points at a directory that does not exist, or the build wrote output to a different folder or a different working-directory.
The producing step failed or was skipped
If the build that creates the files errored earlier (and the upload runs with if: always()), there is nothing to collect.
How to fix it
Verify the path and surface true empties as errors
- List the output directory just before upload to confirm files exist.
- Correct the
pathglob (andworking-directoryif used). - Set
if-no-files-found: errorso an unexpected empty upload fails loudly.
- run: ls -la dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/**
if-no-files-found: errorOnly upload when the build succeeded
Avoid if: always() on the upload unless you handle empties; otherwise a failed build leaves no files and triggers this warning.
How to prevent it
- Confirm the artifact path with a directory listing before upload.
- Set
if-no-files-found: errorto catch empty uploads early. - Match the glob to where the build actually writes output.