Sharing data files across jobs in a multi-job GitHub Actions workflow is easy with the upload and download artifact actions. In this guide, you’ll learn how to create a simple ASCII art file in one job, upload it as an artifact, then download and use it in subsequent test and deploy jobs.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
This example uses the Ubuntu runner and the cowsay utility to generate a
dragon.txt file. You can adapt it to any file or command.1. Initial Workflow Structure
Below is a basic workflow that generates adragon.txt file but does not yet share it between jobs:
build_job_1 to downstream jobs, use the actions/upload-artifact and actions/download-artifact actions.

2. Uploading Artifacts
Useactions/upload-artifact@v3 to upload files or directories as build artifacts. Here’s the minimal syntax:
| Parameter | Description |
|---|---|
name | A unique identifier for the artifact |
path | File or directory to upload |

3. Downloading Artifacts
In downstream jobs, invokeactions/download-artifact@v3 to retrieve the artifact:
4. Integrate Upload in the Build Job
Modifybuild_job_1 to upload the generated dragon.txt:
5. Download in the Test Job
Ensuretest_job_2 depends on build_job_1 and downloads the artifact before running assertions:
6. Download in the Deploy Job
Similarly, pull the artifact indeploy_job_3 to read and then deploy:
7. Workflow in Action
When you push these changes, GitHub Actions uploads and downloads the artifact across jobs.

Sample Download Log
8. Artifact Retention Policy
By default, uploaded artifacts are retained for 90 days. To adjust this setting:- Go to your repository’s Settings → Actions → Artifact and log retention.
- Update the retention period as needed.
| Setting | Default | Location |
|---|---|---|
| Artifact retention period | 90 days | Repository settings under Actions |
Increasing retention beyond 90 days may count against your GitHub storage quota.

References
- actions/upload-artifact
- actions/download-artifact
- GitHub Actions Documentation
- Managing retention settings