Skip to content

ReleaseGuideline

Mike Taves edited this page Feb 12, 2025 · 7 revisions

Here are the steps to publishing a new release.

  1. Prepare local develop branch:
    git fetch origin
    git checkout develop
    git pull
  2. 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
  3. Edit the version file pypestutils/version.py like this:
    - __version__ = "0.2.1.dev0"
    + __version__ = "0.3.0"
  4. Edit the version file:
    vim pypestutils/version.py
  5. 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.
  6. 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
  7. On GitHub, create a new pull request, which should look like this:
    Screenshot from 2023-10-27 12-39-33
    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.
  8. Merge this release to main using the following steps:
    git checkout main
    git pull
    git merge rel-0.3.0
    git push origin main
  9. 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 of CHANGELOG.md, which should look like this:
    image
    Click OK and it should be published on PyPI!
  10. Fetch tags, and merge main back to develop like this:
    git fetch --tags
    git checkout develop
    git pull
    git merge main
  11. Prepare the next phase of development by incrementing the version like this:
    -__version__ = "0.3.0"
    +__version__ = "0.3.1.dev0"
  12. 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!

Clone this wiki locally