# GitHub Actions: Error: Unable to download artifact(s): Artifact not found for name: build

**Code:** `Unable to download artifact` · **Category:** CI/CD · **Seen on:** GitHub Actions

`download-artifact` could not find an artifact with that name in the run (or repository) — it was never uploaded, named differently, expired or lives in another run.

## Meaning

Artifacts belong to a workflow run. A job can only download artifacts uploaded earlier in the same run (and the uploading job must have finished — use `needs`). Names are case-sensitive, retention defaults to 90 days, and in v4 artifacts from other runs need a token and `run-id`.

## Common causes

- Upload step skipped or failed (nothing to upload, wrong `path`)
- Name differs between upload and download
- Download job runs before the upload job finishes (missing `needs:`)
- Artifact expired or deleted
- Trying to download from another workflow run without `run-id` and token

## Quick fix

1. Check the Artifacts section of the run for the exact name
2. Add `needs: build` to the download job
3. Set `if-no-files-found: error` on upload to catch empty uploads

## Detailed fix by platform

### GitHub Actions

1. Cross-run: `uses: actions/download-artifact@v4` with `run-id: ${{ github.event.workflow_run.id }}` and `github-token: ${{ secrets.GITHUB_TOKEN }}`

## Code examples

### Upload then download in order

```yaml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - run: mkdir dist && echo hi > dist/a.txt
      - uses: actions/upload-artifact@v4
        with: { name: build, path: dist/, if-no-files-found: error }
  test:
    needs: build                         # wait for the upload
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with: { name: build }
```

## How to diagnose

1. **Name** — Exact artifact name uploaded?
2. **Order** — Does the job depend on the uploader?
3. **Run** — Same workflow run?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-artifact-not-found)
