Skip to content
Artifacts
step 1/5

Reading — step 1 of 5

Read

~1 min readExecution

Artifacts

Files generated by the build (binaries, archives, reports) need to:

  1. Persist beyond the job (workspace is wiped after).
  2. Be downloadable for debugging.
  3. Pass between jobs in the pipeline.
- uses: actions/upload-artifact@v4
  with:
    name: build-output
    path: dist/
    retention-days: 7

Stored in cloud blob storage. Retention typically 90 days max (configurable).

For passing to next job:

deploy:
  needs: build
  steps:
    - uses: actions/download-artifact@v4
      with:
        name: build-output
        path: dist/

Test reports: special category. JUnit XML, JSON, etc. → CI UI parses and displays test results inline.

Artifact size matters: gigabyte uploads are slow + expensive. Compress, only upload necessary files.

Common bug: forgetting to upload artifacts; debugging a failed job means re-running. Always upload at least logs from failing steps.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…