Release a repository#
This guide shows you how to release a repository with repoplone release.
It assumes the repository has a repository.toml file and news fragments to release.
Prepare the working tree#
Switch to the branch you release from, and update it.
git switch main
git pull --ff-only
Check that the working tree is clean.
git status --short
The release commit includes every tracked file with changes. repoplone refuses to start a release while a tracked file has uncommitted changes. Commit or stash them first.
Preview the changelog and the version#
Print the changelog entry the release will write.
uvx repoplone changelog preview
Print the next version for each bump keyword.
uvx repoplone versions next
Pick the keyword that gives the version you want, such as minor or a.
Rehearse with a dry run#
Run the release with --dry-run and the keyword.
uvx repoplone release --dry-run minor
repoplone runs every step, and prints what it would change.
It does not commit, tag, push, or publish.
It does build each Python package with publish = true, and leaves a dist/ folder in it.
The release empties that folder before it builds again.
Release#
Run the same command without --dry-run.
uvx repoplone release minor
repoplone prints the changelog entry and asks you to continue. It then shows the new version and asks again. It then releases the packages, pushes the commit and the tag, and creates the GitHub release, without asking. The last step prints a summary and asks for a final confirmation, after everything is done.
In a calver repository, leave out the keyword. repoplone computes the next version.
uvx repoplone release
In a semver repository, leaving out the keyword shows a menu of versions to choose from.
Restart a release that failed#
When a step fails, repoplone prints Release failed:, the step, and the reason.
Fix the cause, then restart from the step that failed.
uvx repoplone release --start-step release_python 1.2.0
Give the version of the release that failed.
After the version step, repoplone does not compute it again.
Packages already published at that version are skipped.
To list the step ids of the repository, run this command.
uvx repoplone settings release-steps
See also
Authenticate to PyPI, npm, and GitHub, to set up PyPI, npm, and GitHub before the first release.
The release pipeline, for why a release runs as steps.
Release steps, for what each step writes.