This runbook describes the maintainer-controlled release sequence for Repo Fixer. It does not publish packages, create tags, or create GitHub releases automatically.
Before preparing a release, explicitly decide and record:
pyproject.toml is the package version source of truth.Do not infer or silently choose these values from branch names, tags, or prior releases.
git status --short
git rev-parse HEAD
pyproject.toml and the corresponding changelog heading agree. Do not edit a released tag or rewrite published history.Use a new, empty output directory. From the repository root:
python scripts/verify_release_artifacts.py --artifacts-dir artifacts-normal
The verifier builds a wheel and source distribution from isolated source copies, validates their metadata, installs each artifact in a temporary virtual environment, runs the installed CLI help smoke test, and writes SHA-256 sidecars.
A successful run exits with status zero and prints VERIFIED: lines for the wheel, sdist, and both checksum sidecars.
Prepare a new, empty wheelhouse for the current Python/platform. Read the setuptools build requirement directly from pyproject.toml; do not maintain a second hard-coded minimum in release commands.
$wheelhouse = Join-Path $env:TEMP ("repo-fixer-wheelhouse-" + [guid]::NewGuid().ToString("N"))
$artifacts = Join-Path $env:TEMP ("repo-fixer-artifacts-" + [guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Path $wheelhouse, $artifacts | Out-Null
$buildRequirement = python -c "import tomllib; p=tomllib.load(open('pyproject.toml','rb')); print(next(x for x in p['build-system']['requires'] if x.startswith('setuptools')))"
python -m pip download --only-binary=:all: --dest $wheelhouse $buildRequirement wheel -r requirements.txt
python scripts\verify_release_artifacts.py --wheelhouse $wheelhouse --no-index --artifacts-dir $artifacts
wheelhouse="$(mktemp -d)"
artifacts="$(mktemp -d)"
build_requirement="$(python -c "import tomllib; p=tomllib.load(open('pyproject.toml','rb')); print(next(x for x in p['build-system']['requires'] if x.startswith('setuptools')))")"
python -m pip download --only-binary=:all: --dest "$wheelhouse" "$build_requirement" wheel -r requirements.txt
python scripts/verify_release_artifacts.py --wheelhouse "$wheelhouse" --no-index --artifacts-dir "$artifacts"
The offline invocation must include both --wheelhouse and --no-index. A wheelhouse alone still permits package-index fallback. Use a compatible wheelhouse for each target Python/platform.
Before publishing:
pyproject.toml..dist-info/METADATA and confirm the SPDX License-Expression, License-File, and packaged license file are present.PKG-INFO and confirm its LICENSE file is present..sha256 sidecar against its exact artifact file. On Windows:
Get-ChildItem .\artifacts-normal -Filter "*.sha256" | ForEach-Object {
$artifact = $_.FullName.Substring(0, $_.FullName.Length - ".sha256".Length)
$expected = ((Get-Content $_.FullName -Raw).Trim() -split "\s+")[0]
$actual = (Get-FileHash -Algorithm SHA256 $artifact).Hash.ToLowerInvariant()
if ($actual -ne $expected) { throw "Checksum mismatch: $artifact" }
Write-Host "VERIFIED $artifact"
}
On macOS/Linux:
(cd artifacts-normal && sha256sum --check ./*.sha256)
Only after explicit maintainer approval of the version and release notes:
The tag and GitHub release are separate maintainer actions; the verifier does neither.
Use the repository’s trusted-publishing workflow only after its one-time PyPI publisher configuration and protected GitHub environment are complete. Review the workflow and release verification evidence before approving the publish job. Do not use a long-lived PyPI API token in repository secrets.
The publishing workflow must upload the exact wheel and sdist produced and verified by the release workflow; it must not rebuild them in the publishing job.
After publishing:
repo-fixer --version and confirm it reports the approved version.Stop and ask for maintainer review if the package version and changelog disagree, the PyPI name has not been explicitly confirmed, either verifier mode fails, artifact metadata or license payload is missing, checksums differ, the tag already exists, or the trusted-publishing configuration is incomplete.