Workflow artifacts are files or collections of files produced during a workflow run. They allow data to persist after a job completes and can be shared between jobs in the same workflow or reviewed after the run ends. Common artifacts include log files, test results, screenshots, binary files, and code coverage reports. GitHub provides two official actions for working with artifacts: `actions/upload-artifact` for storing files and `actions/download-artifact` for retrieving them. To upload an artifact, a workflow step uses `actions/upload-artifact` with a `name` and `path` input. If no name is provided, the default name `artifact` is used. A custom retention period can be set using the `retention-days` input, though this value cannot exceed the limit set by the repository, organization, or enterprise. To share data between jobs, a downstream job uses `actions/download-artifact` with the same artifact name and must declare a `needs` dependency on the uploading job to ensure correct execution order. Artifacts from a different workflow run or repository require a token and run identifier to download. Deleting a workflow run also deletes all its associated artifacts from storage. Workflow run logs are accessible from the Actions tab in the GitHub web interface. Read access to the repository is required to view or download logs; write access is required to delete them. Logs can be searched (only expanded steps are included in search results), downloaded as a zip archive via the gear icon in the log viewer, or viewed and filtered using GitHub CLI with commands such as `gh run view RUN_ID --log` and `gh run view --job JOB_ID --log-failed`. When a partially re-run workflow's log archive is downloaded, only the re-run jobs are included; to get a complete set, log archives from previous run attempts must also be downloaded. Logs can be deleted through the GitHub web interface or programmatically using the REST API. Within the parent section on authoring and maintaining workflows, the ability to access artifacts and logs is central to the full workflow lifecycle. Practitioners must interpret run outcomes, diagnose failures using build logs, and retrieve build outputs such as compiled binaries or test reports. Understanding how to configure artifact upload and download steps, manage retention, and retrieve logs programmatically is essential for maintaining reliable CI/CD pipelines on GitHub Actions.
The `actions/upload-artifact` and `actions/download-artifact` actions are used to store and retrieve workflow artifacts, with `artifact` as the default name when none is specified.
Artifacts can be shared between jobs in the same workflow by using `needs` to sequence jobs and referencing the same artifact name in the download step.
A custom retention period for an artifact is set with the `retention-days` input on `upload-artifact`, and the value cannot exceed the limit configured at the repository, organization, or enterprise level.
Downloading artifacts from a different workflow run or repository requires supplying a token and run identifier to the `download-artifact` action.
Read access to the repository is required to view, search, or download workflow run logs; write access is required to delete logs.
When downloading the log archive for a partially re-run workflow, only the re-run jobs are included, so logs from previous run attempts must be downloaded separately for a complete set.