Release Management

A release is a promise. The version number tells users how risky an upgrade is, the release notes tell them what changed, and the support policy tells them how long the promise lasts. Release management is the discipline of keeping those three signals honest, so that users can upgrade without fear and maintainers can retire old code without surprising anyone.

Versioning Schemes

A version identifier is an interface in its own right: tools compare it, dependency resolvers act on it, and people read meaning into it. Choose a scheme deliberately, document it in the repository, and apply it consistently. Changing the meaning of version numbers mid-project breaks every user who relied on the old meaning.

Semantic Versioning

Semantic Versioning 2.0.0 uses MAJOR.MINOR.PATCH and ties each number to the project's public API, which must therefore be declared, whether in documentation or in code:

IncrementWhenExample
MAJORIncompatible change to the public API.1.9.3 → 2.0.0
MINORNew functionality that is backward compatible, including new deprecations.1.9.3 → 1.10.0
PATCHBackward-compatible bug fixes only.1.9.3 → 1.9.4

Incrementing a number resets the ones to its right to zero. Versions 0.y.z are reserved for initial development, where anything may change at any time; releasing 1.0.0 is the moment the project commits to a stable API. Staying on 0.x for years is a signal to users that the project does not promise compatibility, whatever the README says.

Pre-releases and Build Metadata

A hyphen introduces a pre-release identifier and a plus sign introduces build metadata. Pre-releases sort before the release they precede; build metadata is ignored when comparing precedence.

# SemVer precedence, lowest to highest
1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0

# Build metadata does not change precedence: these two are equal for ordering
1.0.0+20261114.sha.5114f85
1.0.0+exp.linux.x64

Note that numeric identifiers compare numerically (beta.2 precedes beta.11), while alphanumeric identifiers compare lexically. Use a small, fixed vocabulary such as alpha, beta and rc so ordering is predictable.

Calendar Versioning and Other Schemes

Not every project has an API whose compatibility can be summarized in three numbers. Applications, distributions and tools that release on a schedule often use calendar versioning, where the version encodes the release date — for example Ubuntu's 24.04 (April 2024). CalVer tells users how old a release is, but says nothing about compatibility, so a project using it must communicate breaking changes another way: in release notes, deprecation warnings and the support policy.

Changelogs and Release Notes

A version number says how much changed; release notes say what changed and what to do about it. Commit logs are not release notes: they are written for reviewers, contain internal noise, and rarely explain impact. Curate notes for the people who upgrade.

Keep a Human-Readable Changelog

A common convention is Keep a Changelog: a CHANGELOG.md file, newest release first, with an Unreleased section that contributors update in the same pull request as their change. Entries are grouped by type, so readers can jump straight to what concerns them.

# Changelog

All notable changes to this project are documented in this file.
The project follows Semantic Versioning.

## [Unreleased]

### Added
- `--json` output flag for the `status` command (#412).

## [2.0.0] - 2026-11-02

### Changed
- **Breaking:** `load_config()` now raises `ConfigError` instead of returning `None`
  for a missing file. See the migration guide in docs/upgrading-to-2.md.

### Removed
- **Breaking:** the `legacy_parse()` function, deprecated since 1.8.0.

### Fixed
- Timestamps in log output now include the UTC offset (#398).

### Security
- Reject archive entries with absolute paths during extraction (CVE reference in advisory).

[Unreleased]: https://example.org/project/compare/v2.0.0...HEAD
[2.0.0]: https://example.org/project/compare/v1.9.4...v2.0.0

Write Notes for the Upgrader

Every entry should answer one question: does this affect me, and what must I do? Put breaking changes and security fixes first and mark them clearly. Link to the issue or pull request for detail rather than pasting it. Name the deprecated item and its replacement. Thank contributors by name where the platform allows it — it costs nothing and is one of the cheapest forms of contributor retention (see Maintainership).

Structured commit conventions such as Conventional Commits (feat:, fix:, feat!: for breaking changes) can generate a draft changelog and even suggest the next version. Treat the generated text as a draft: a person still decides what is notable and rewrites entries in terms of user impact.

The Release Process

A release should be a routine, repeatable procedure, not an act of heroism. Write the steps down in a RELEASING.md file or automate them, so any maintainer — not only the original author — can cut a release.

Tag the Exact Revision

An annotated Git tag records who released what, when, and from which commit. Signing the tag lets users verify that it came from a maintainer. Push the tag explicitly; git push does not send tags by default.

# Release 2.1.0 from an up-to-date, clean main branch.
git switch main
git pull --ff-only
git status --short              # must print nothing: release only committed code

# Annotated tag (use -s instead of -a to create a signed tag).
git tag -a v2.1.0 -m "Release 2.1.0"
git push origin v2.1.0

# Verify a signed tag before trusting it.
git tag -v v2.1.0

Never move or delete a published tag. Users and package mirrors may already have fetched it; rewriting it creates two different artifacts with the same name. If a release is broken, publish a new patch version and mark the bad one as yanked or withdrawn in the package registry.

Use a Release Checklist

The pipeline from CI/CD Basics should build, test and publish the artifact from the tag. Around that automation, a short checklist catches what machines cannot:

  1. The Unreleased changelog section is complete and renamed to the new version with today's date.
  2. The version number in package metadata matches the tag.
  3. Breaking changes have a migration guide, and deprecations name their removal version.
  4. The artifact is built once from the tagged commit, with checksums or attestations published beside it.
  5. The release announcement links to the notes and, for security fixes, to the advisory.

Deprecation and Migration Planning

Removing a feature is a breaking change; deprecating it first turns that break into a scheduled, announced event. A good deprecation tells users three things: what is going away, what replaces it, and when the removal will happen.

Deprecate Before You Remove

Under SemVer, deprecation belongs in a MINOR release and removal in the next MAJOR release. Emit a warning at the point of use so users discover the deprecation from their own test runs, not from a broken production upgrade. In Python, for example:

import warnings


def legacy_parse(text):
    """Deprecated since 1.8.0; use parse() instead. Removal planned for 2.0.0."""
    # stacklevel=2 attributes the warning to the caller's line, not to this function.
    warnings.warn(
        "legacy_parse() is deprecated and will be removed in 2.0.0; use parse()",
        DeprecationWarning,
        stacklevel=2,
    )
    return parse(text)


def parse(text):
    return text.split(",")

Keep the old and new paths working side by side for at least one minor release, so users can migrate incrementally rather than in a single risky step.

Write a Migration Guide

Each major release deserves an upgrade document that lists every breaking change with a before-and-after example. Order the entries by how many users each change affects. Where a change is mechanical — a renamed function or a moved module — consider shipping a codemod or script that applies it automatically. The fewer manual steps an upgrade requires, the fewer users stay behind on old, unsupported versions.

Support Windows

A support policy states which release lines receive fixes and for how long. Without one, users assume every version is supported forever and maintainers are pressured to backport fixes indefinitely. Publish the policy in the documentation, and list supported versions in SECURITY.md, where security researchers look for them.

Define Release Lines and LTS

PolicyWhat is supportedSuits
Latest onlyFixes go into the newest release; users upgrade to get them.Small libraries with few maintainers.
N and N−1The current major line plus the previous one for security fixes.Libraries with a significant installed base.
Long-term support (LTS)Selected releases receive fixes for a stated, longer period.Runtimes, frameworks and distributions used in production.

Node.js is a well-known example: even-numbered major releases enter an LTS phase with a published end-of-life date, and its release schedule shows every line's dates in advance. That predictability is the point — organizations can plan upgrades around a calendar instead of reacting to announcements.

Backport Fixes Deliberately

Maintain one branch per supported line (for example release/1.x) and land fixes on main first, then cherry-pick them back. Fixing the old branch first risks the fix never reaching the current code. Backport only bug and security fixes: adding features to an old line multiplies testing work and blurs the reason to upgrade. When a line reaches end of life, announce it ahead of time, archive the branch, and say so in the README and SECURITY.md.

Practice Lab

Use a small repository of your own, or a fork, so tags and releases do not affect real users.

Cut a Release

  1. Write a one-paragraph versioning policy in the README that defines the public API and the scheme you use.
  2. Create CHANGELOG.md with an Unreleased section, make two changes, and record each in the same commit as the change.
  3. Decide the next version number from the changelog alone, without reading the diff — if you cannot, the entries are too vague.
  4. Rename the section, create an annotated tag, push it, and confirm the CI pipeline publishes an artifact from exactly that tag.

Plan a Deprecation

  1. Pick a function to replace, add the new one, and make the old one emit a deprecation warning that names the replacement and the removal version.
  2. Release that as a MINOR version and confirm the warning appears in a test that calls the old function.
  3. Write the migration-guide entry with a before-and-after example, then remove the old function in a MAJOR release.
  4. Add a support table to SECURITY.md stating which lines still receive security fixes.