Automatically create tag after PR based on new version string discovered in source code

33 Views Asked by At

I have a Python package hosted on GitHub. My current non-automated workflow is that I

  • create a feature branch
  • create a PR (on GitHub) feature -> main
  • update code (on pushes to the PR branch some CI linting/testing runs)
  • Once the update is near completion I
    1. manually version bump __version__ in __init__.py and
    2. manually update CHANGELOG.rst to reflect the new version and changes therein.
  • Merge the PR from feature branch into main
  • On my local repo, I create a tag on the new commit on the main branch matching the new __version__ in __init__.py. Then I push this tag to GitHub

Could someone point me to/recommend a tool that automates the last step? I've found a number of tools which advertise themselves as parsing the commit logs and source code to infer the next version number and then update it in the source and create a tag. But I don't want the tool to infer the version number and bump it in source + tag, I want it to find the version number in the source and create the tag.

0

There are 0 best solutions below