Cache or artifact: classify five things.
BeginnerConceptCaching, Artifacts, Runners & ARC
Answer
~/.npmdownload cache: cache (speed, disposable, keyed by lockfile).- Compiled
dist/passed from build job to deploy job in the same run: artifact. - JUnit XML and coverage HTML for humans: artifact.
- Terraform provider plugins: cache.
- Release binaries: neither long term; attach to a GitHub Release or push to a registry.
Rule: cache may vanish at any time and the job must still work; artifacts are outputs you expect to exist.
More on Caching, Artifacts, Runners & ARC
How does `actions/cache` match keys and restore keys?IntermediateWhich caches can a branch restore from?AdvancedWhat are the cache size limits and eviction rules?BeginnerWhen should you use setup-* built-in caching instead of `actions/cache`?BeginnerWhy cache the package manager's download cache rather than `node_modules`?AdvancedHow do `actions/cache/restore` and `actions/cache/save` help?Advanced