Skip to content

How to make a release

Mark Dickinson edited this page Oct 7, 2023 · 7 revisions

Steps for making a release of this package

Assuming that the package is in a ready-to-release state:

  • Write the release notes, in markdown format. git log provides a useful starting point to find all changes since the previous release: for example, with something like:

    git log v0.3.0..HEAD --pretty="* %s"
    
  • Use an annotated tag to tag the release: for example with git tag -a v0.4.0. This should open an editor window for the tag message. Edit the tag message to start with a single line in the form # refcycle 0.4.0 and continue with the release notes. Note: adding markdown in a tag message can be awkward, since the # character used for Markdown headings conflicts with git's default comment character. I use git config --global core.commentchar ";" to work around this.

  • Push the tag to GitHub with git push --tags

  • Edit the GitHub release on the Releases page. The release notes should be edited to match those in the tag message.

  • Publish the release on GitHub. This should automatically trigger wheel and sdist builds and uploads to PyPI.

Clone this wiki locally