How do artifacts work in GitHub Actions?
BeginnerConceptGitHub Actions
Answer
actions/upload-artifact stores files from a job under the workflow run; actions/download-artifact retrieves them in a later job or lets users download them from the UI. Default retention is 90 days (configurable with retention-days). With v4, artifact names must be unique per run.
- uses: actions/upload-artifact@v4
with:
name: app-dist
path: dist/
retention-days: 7
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate