upload-artifact action
The official action that uploads files from a job to artifact storage under a name, so later jobs or people can download them.
In more detail
Its two key inputs are name and path, where the path can be a file, a folder or a glob pattern. The optional retention-days input shortens how long the artifact is kept.
Example
- uses: actions/upload-artifact@v5
with:
name: app-package
path: dist/Related terms
- artifact — A file produced by a build, such as a compiled program or an image, that is stored and passed on to later steps.
- download-artifact action — The official action that downloads an artifact uploaded earlier in the same workflow run, by name, into the job's workspace.
- retention period — How long stored data such as a workflow artifact is kept before it is deleted automatically.
Taught in
- Passing Data Between Jobs: Artifacts — Continuous Integration & Continuous Delivery Pipelines
- Artifact Promotion: Staging to Production — Continuous Integration & Continuous Delivery Pipelines