Night Mode LabsBlue Book
Delivery

Release Management

Modern release management separates deployment from release. Deployment moves code into an environment. Release exposes capability to users. This separation lets teams ship smaller changes and reduce blast radius.

  • Use trunk-based development or short-lived branches for most services.
  • Protect the main branch with tests, security checks, review, and signed commits where required.
  • Build once, promote the same artifact across environments, and record provenance.
  • Use feature flags, gradual rollout, canaries, and blue-green deployment for risky changes.
  • Define rollback and roll-forward paths before production deployment.
  • Keep release notes generated from pull requests, commits, and issue links.

Branching strategy

Prefer trunk-based development for most modern services. Keep main releasable, merge small reviewed changes quickly, and use feature flags when code must land before it is visible to users.

Use alternatives deliberately:

StrategyBest fitWatchouts
Trunk-based developmentHigh-release-frequency services, platform code, and teams with strong CIRequires reliable automated checks and small changes
GitHub FlowSimple web services and SaaS products that deploy from mainNeeds deployment controls when production release differs from merge
GitLab FlowTeams that need environment branches, release branches, or issue-linked workflowCan become heavy if every environment becomes a long-lived branch
Git FlowInstalled software, versioned products, or multiple supported release linesUsually too slow for continuous delivery and cloud services
Short-lived release branchesStabilizing a specific release candidate or supporting a patch windowKeep them temporary and merge fixes back to main quickly

Avoid long-lived feature branches for normal delivery. They hide integration risk and usually create painful merges. If a change is too large to merge safely, split it behind flags, compatible schema changes, or temporary parallel paths.

Python package release management

Python services and libraries need a release path that handles package metadata, versioning, distribution, and deployment artifacts without manual version edits.

For Python libraries, prefer a pyproject.toml-first workflow using uv, Hatch, PDM, Poetry, or Setuptools depending on the client's standard. Build wheels and source distributions in CI, publish through trusted publishing with PyPI or an internal package index, and attach provenance where the registry supports it.

For version automation, common strategies are:

  • semantic-release with Python plugins when the team already uses Conventional Commits and wants fully automated versioning, changelogs, tags, and package publication.
  • Release Please when the team wants release pull requests that make version and changelog changes explicit before publishing.
  • python-semantic-release for Python-native semantic versioning from commit history.
  • towncrier when maintainers want human-curated changelog fragments, especially for libraries.
  • setuptools-scm when versions should derive from Git tags instead of committed version files.
ToolBest fitVersion sourceChangelogPublish support
semantic-releasePolyglot repos already using Conventional CommitsCommit historyAutomaticPlugin-based
Release PleaseTeams that want reviewable release pull requestsCommit history plus release PRAutomatic, reviewed in PRCI-triggered after merge
python-semantic-releasePython-first libraries and servicesCommit historyAutomaticPyPI and GitHub releases
towncrierLibraries needing curated human release notesMaintainer-controlledFragment-basedNo, pair with CI publish
setuptools-scmPackages that should never commit version bumpsGit tagsNoNo, pair with build and publish steps
HatchModern Python packaging and environment workflowsConfigurableNoBuild-first, pair with publisher
uvFast installs, locking, builds, and publishingProject metadata or build backendNoYes, via publish workflows

For deployable Python services, publish both a Python artifact and an immutable container image when useful. Tag releases with the Git SHA, semantic version, and image digest. Keep database migrations separate from package publication, and document rollback behavior for code, containers, migrations, and background workers.

Approval model

Approvals should match risk:

  • Low-risk services can deploy automatically after required checks pass.
  • Regulated or high-impact services may require change approval, but the evidence should be generated by the pipeline.
  • Emergency releases need a documented break-glass path and mandatory post-release review.

Release evidence

A production release should leave behind:

  • Artifact digest and software bill of materials.
  • Commit SHA, pull request, issue, and reviewer history.
  • Test, scan, and policy results.
  • Deployment time, environment, actor, and rollout status.
  • Rollback command or previous known-good artifact.

Tooling examples

On this page