liveBook · Manning

Software artifact

As explained in GitHub Actions in Action: Continuous integration and delivery for DevOps

A software artifact is a generated file or package retained or transferred as an output of a development workflow.

A software artifact is a generated output retained or transferred by a development workflow. Artifacts include compiled binaries, container images, packages, deployment descriptors, and arbitrary files such as ZIP archives. CI produces them after source retrieval, building, testing, and packaging; CD consumes a consistent, versioned set for deployment. section 8.4.2 section 8.0 section 9.4

Use different artifact types for different handoffs. Container images and packages can be published to registries, while workflow storage can retain files for later jobs or workflows. A release packages deployment-ready artifacts as an explicit handoff, helping tie deployed files back to source changes and version numbers. section 8.3.5 section 8.5.6 section 8.5.8

Prepare artifacts so they are usable, traceable, and safe to promote:

  • Build production-focused outputs separately from debug builds; removing debug information reduces artifact size and avoids a potential security risk. section 8.3.5
  • Generate deployment descriptors during CI by replacing template tokens with the exact container tags produced by the build. section 8.5.7
  • Attach deployment files and other deployable outputs to a versioned release after successful CI checks, then let that release trigger CD. section 8.5.8 section 8.7
  • Set retention deliberately for temporary workflow artifacts; storage is billable, defaults to 90 days, and can be shortened after outputs reach packages or releases. section 12.2

Passing a deployment file between jobs

A build job creates a file and uploads it with actions/upload-artifact under a chosen name. A deploy job that depends on the build uses actions/download-artifact with that name, making the generated file available without rebuilding it. section 8.5.6

Listing 8.14 Uploading artifacts to GitHub
name: Upload and Download arbitrary artifacts
on:
  workflow_dispatch:
env:
  deploymentFile: 'file-I-want-to-use-in-deploy-phase.txt'
jobs:
  
  build:
  
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
  
    - name: create a file we will use in next job
      run: |
        touch ${{github.workspace}}/${{env.deploymentFile}}
        
    - name: Upload a Build Artifact
      uses: actions/upload-artifact@v3
      with:
        name: deployfile
        path: ${{github.workspace}}/${{env.deploymentFile}}
        
  deploy:
    runs-on: ubuntu-latest
    needs: build
    steps:
    - name: Download artifact from build job
      uses: actions/download-artifact@v3
      with:
        name: deployfile
    - name: show files downloaded
      run: |
        ls  ${{github.workspace}}

The workflow listing shows the complete upload-and-download pattern: create a file, name and upload it in the build job, then retrieve it in the dependent deploy job. section 8.5.6

How GitHub Actions in Action: Continuous integration and delivery for DevOps covers it

How deep it goes
Explains artifact creation, storage, release attachment, deployment-file preparation, and retention configuration rather than artifact format internals.
Examples
Uses .NET binaries, container images, Kubernetes YAML with image-tag tokens, and an uploaded file retrieved by a deploy job.
What it assumes
Assumes familiarity with CI workflows, source builds, and deployment targets while demonstrating GitHub Actions artifact transfer.
What you can do after
Operate/configure artifacts for workflow transfer, release handoff, deployment traceability, and storage-cost control.
How it connects
Connects continuous integration, continuous delivery, releases, container images, package registries, Kubernetes deployment descriptors, and GitHub Actions.

Also explained in

Compare how 4 books explain software artifact →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of GitHub Actions in Action: Continuous integration and delivery for DevOps. The section links point to the parts of the book it draws on.