I would like to use Poetry to manage dependencies, and Github releases to manage my releases. Poetry projects contain a pyproject.toml
file. Among other things, this includes a project version.
In order to create a Github release that has the correct (newest) version in the pyproject.toml
file, I have to create a one-line pr that bumps the version before I can create a Github release. This is not ideal because:
- It makes the release flow more manual and introduces possible human error.
- It is possible for the
pyproject.toml
version to vary widely from the github release.
Ideally, the version would be set when releasing. It’s certainly possible to edit the code in the repo inside of a Github release action, but this seems far from a best practice.
Is there a way to set the version to a variable that is supplied at the time of release? Or is there some other way of doing this?