How to Make a Release#
Releases are managed with an interactive shell script that walks through
every step in the correct order and prevents common mistakes (such as
pushing a tag before updating switcher.json).
Script location#
scripts/release.sh
Usage#
bash scripts/release.sh [--dry-run] [VERSION]
Options#
VERSIONThe version string to release (e.g.
0.4.1or0.4.1rc1). Prompted interactively if omitted.--dry-runWalk through all steps and show what would happen without writing any files, creating commits, pushing, or tagging. Network calls (
git fetch) are also skipped. Useful for previewing a release or verifying the script before the real run.-h,--helpPrint usage and exit immediately.
Typical workflow#
Preview the release first:
bash scripts/release.sh --dry-run 0.4.1
Then run for real:
bash scripts/release.sh 0.4.1
The script is interactive: it confirms each destructive action before proceeding and pauses at manual steps (milestone triage, RELEASE_NOTES editing, waiting for CI).
Steps performed#
Step |
Name |
What happens |
|---|---|---|
0 |
Preflight checks |
Verifies branch, clean working tree, sync with origin, and that the tag does not already exist. |
1 |
Milestone triage |
Lists open milestones; prompts to close or defer any remaining issues before tagging. |
2 |
RELEASE_NOTES.rst |
Reminds you to move the release section out of the |
3 |
Update switcher.json |
Adds the new version to
|
4 |
pre-commit |
Runs |
5 |
Test suite |
Optionally runs |
6 |
Commit |
Stages and commits all release-prep changes (RELEASE_NOTES, switcher.json). |
7 |
Push |
Pushes the release-prep commit to |
8 |
CI gate |
Pauses so you can confirm all CI workflows are green before tagging. |
9 |
Tag |
Creates an annotated tag and pushes it, triggering the docs and PyPI publish workflows. |
10 |
GitHub Release |
Creates the GitHub Release via |
11 |
Monitor CI |
Reminds you to watch the |
12 |
conda-forge |
Reminds you to review and merge the automated feedstock PR. |
Piping output#
The script detects when its output is not connected to a terminal and suppresses ANSI colour codes automatically, so it is safe to pipe through less or tee:
bash scripts/release.sh --dry-run 0.4.1 2>&1 | less
bash scripts/release.sh 0.4.1 2>&1 | tee release.log