Skip to content

Lesson 5 of 9 · 23m

Release Engineering for Small Teams

Build repeatable releases with tags, artifacts, provenance, signing, and rollback plans before your project becomes critical infrastructure.

A release is not a git tag you make after lunch. It is a supply-chain artifact: source, build environment, dependencies, credentials, metadata, signatures, package registry state, docs, and changelog all landing in a consistent shape. Doing this manually works until the day you are tired, traveling, or responding to a CVE. Automate the boring parts before you need them under pressure.

The minimum repeatable pipeline

tag/release PR -> clean CI checkout -> tests, lint, package build
  -> provenanced/signed registry artifact -> release notes and versioned docs

Use CI-native trusted publishing where possible. PyPI supports OIDC trusted publishers; npm has provenance attestations for GitHub Actions; Sigstore/cosign can sign container images and blobs. The goal is fewer long-lived tokens sitting in maintainer laptops.

# GitHub Actions shape, abbreviated
on:
  release:
    types: [published]
permissions:
  id-token: write
  contents: read
steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-python@v5
    with: { python-version: "3.12" }
  - run: pip install build && python -m build
  - uses: pypa/gh-action-pypi-publish@release/v1

Determinism is a spectrum

Perfect reproducible builds are hard; useful discipline is not. Pin build tool versions, lock dependencies used in release tooling, record the exact source SHA in artifacts, and avoid timestamps or host-specific paths where your ecosystem supports normalization.

For applications and binaries, checksums are table stakes:

sha256sum dist/widgets-linux-amd64.tar.gz > dist/checksums.txt
cosign sign-blob dist/checksums.txt   --output-signature checksums.txt.sig   --output-certificate checksums.txt.pem

Do not invent a custom signing scheme. Use the ecosystem's normal tools and document verification in one copy-pasteable command block.

Rollback and yank are different tools

For libraries, a bad release often cannot be pulled back once cached. Yanking or deleting reduces new adoption but does not repair existing installs. The realistic incident pattern is: publish a fixed patch fast, mark the bad version clearly, and communicate impact. For hosted services and binaries, keep previous artifacts downloadable so users can pin back deliberately.

Release notes are part of the artifact

Attach notes to the exact version. Include upgrade steps before feature celebration. If output formats changed, say so. If there is a known regression, do not hide it; publish a warning while you fix it.

Field notes

  • Make a dry-run release from CI before the first real one. Credential failures at release time are a rite of passage you can skip.
  • Never let the release job run arbitrary contributor-controlled code with publish credentials attached.
  • Protect release branches and tags; require review for version-bump and workflow changes.
  • Keep release automation inside the repo. A release process that lives on one maintainer's laptop is not a process.
  • Record who can yank, rotate tokens, and publish emergency fixes. In a security incident, ambiguity costs hours.

Was this lesson helpful?

Sign in to rate