-
Notifications
You must be signed in to change notification settings - Fork 8
ReleaseGuideline
Mike Taves edited this page Feb 12, 2025
·
7 revisions
Here are the steps to publishing a new release.
- Prepare local
develop
branch:git fetch origin git checkout develop git pull
- Decide to increment either the major, minor and/or micro version numbers. Most of the time this will be the minor number. Now create a release branch based on the new version:
git checkout -b rel-0.3.0
- Edit the version file
pypestutils/version.py
like this:- __version__ = "0.2.1.dev0" + __version__ = "0.3.0"
- Edit the version file:
vim pypestutils/version.py
- Edit
CHANGELOG.md
following Keep a Changelog as a guideline. To help populate changelog items, see https://github.com/pypest/pypestutils/compare/v0.2.0...develop using the previous version as a reference. - Create a commit for the release:
git add pypestutils/version.py git add CHANGELOG.md git commit -m "Release 0.3.0" git push origin rel-0.3.0
- On GitHub, create a new pull request, which should look like this:
Make sure tests pass, and (if needed) get feedback from others if the changelog looks ok. When ready, click "Squash and merge" should be good to go. - Merge this release to
main
using the following steps:git checkout main git pull git merge rel-0.3.0 git push origin main
- On GitHub, create a new release, creating a new tag
v0.3.0
, using a title "Pre-alpha release 0.3.0" and content copied from part ofCHANGELOG.md
, which should look like this:
Click OK and it should be published on PyPI! - Fetch tags, and merge
main
back todevelop
like this:git fetch --tags git checkout develop git pull git merge main
- Prepare the next phase of development by incrementing the version like this:
-__version__ = "0.3.0" +__version__ = "0.3.1.dev0"
- Create one last commit for the develop branch:
git add pypestutils/version.py git commit -m "Post-release 0.3.0" git push origin develop
Done!