-
Notifications
You must be signed in to change notification settings - Fork 167
How to do afdko releases
Josh Hadley edited this page Feb 24, 2022
·
12 revisions
All kinds of releases require tagging a commit.
The tags must follow the versioning scheme defined by PEP 440.
Every new tag must be an increment of the last tag.
- Tag the last commit of the
develop
branch (or any other branch besidesmaster
) according to the pre-release tag requirements defined below:- The tag must have an Alpha, Beta or Release Candidate pre-release segment
{a|b|(c|rc)}N
. - Examples of sequential pre-release tags (assuming
2.7.0
was the last tag):2.7.1a
2.7.1a1
2.7.1a2
2.7.1b
2.7.1b1
2.7.1c
- The tag must have an Alpha, Beta or Release Candidate pre-release segment
- Push the tag to the remote origin.
- Issue one last pre-release, to make sure all systems are go. This extra step will greatly reduce the changes of a botched final release.
- If you have a local branch named
master
, delete it. - Commit the changes to NEWS.md in the
develop
branch (example commit).- Do NOT use
[skip ci]
in the commit message.
- Do NOT use
- Push the commit to the origin.
- Locally, make a branch of
develop
calledrelease
. - Checkout the
origin/master
branch. - Locally, merge the
release
branch intomaster
. - Push the merge commit to the origin.
- Tag the merge commit in
master
according to the final release tag requirements defined below;- The tag must not have any pre-release segment.
- Assuming
2.7.1rc2
was the last tag, the final release tag must be2.7.1
. - Make sure you actually push the tag to origin
- Delete the local
release
andmaster
branches. - Remove pre-release and release candidate tags from local and remote repositories (after builds have all completed).
- Un-tick the "This is a pre-release" checkbox in the release in GitHub ("Edit Release")
- Delete draft releases from GitHub.
- Delete pre-release and release candidate releases from PyPI.
- Confirm that the release description links to the release's notes in NEWS.md (this is performed automatically by the release workflow; this is just a check).
- In GitHub, merge
master
back intodevelop
to keep them in sync and ensure the release tag is present ondevelop
.