The first job must explicitly upload the files you want to share.
By default, each job in a GitHub Actions workflow runs in its own (virtual machine). When a job finishes, its runner is destroyed, along with any local files it created. Artifacts provide a way to persist these files in GitHub's storage so that subsequent jobs can download them into their own unique environments. Implementation Guide: Download Artifact from Another Job github actions download artifact from another job
The second job must wait for the first to finish before it can access the artifact. You ensure this order using the needs keyword. Github actions share workspace/artifacts between jobs? The first job must explicitly upload the files
To successfully download an artifact from a previous job, you must follow a two-step process: in Job A, then Download in Job B. 1. Uploading the Artifact (The Producer Job) Artifacts provide a way to persist these files
To share data between jobs in a single GitHub Actions workflow, you must use the official actions/upload-artifact and actions/download-artifact actions. Artifacts act as a temporary bridge, allowing files produced in one job to be retrieved and used by another later in the run. Why You Need Artifacts for Multiple Jobs