actions/upload-artifact & download-artifact (v4) Reference
Artifacts move files between jobs and out of a run. v4 changed the rules - here is what matters.
Upload build outputs, then download them in a later job or after the run. v4 is faster but stricter than v3.
Usage
.github/workflows/ci.yml
- uses: actions/upload-artifact@v4
with:
name: build-output
path: dist/
retention-days: 7v4 gotchas
- Artifact names must be unique within a run (no more overwriting).
- v3 and v4 artifacts are not cross-compatible.
- Immutable once uploaded - use unique names per matrix entry.
Related guides
actions/cache: Keys, Restore Keys & Best PracticesReference for actions/cache - how cache keys and restore-keys work, what to cache per ecosystem, and how to a…
How to Speed Up GitHub Actions: 9 High-Impact TacticsMake GitHub Actions faster: caching, parallelization, test splitting, Docker layer caching, slimmer images, a…