'How to dea with requirements for release which can only be generated after releasing

We use Git tagging to automate our releasing on GitHub: we tag a certain commit on our release branch as a release and have GitHub Actions run a script which does the actual pushing to PyPI whenever such a tag is pushed.

What I don't like about this setup is that after running pip-compile -P <my-package> then to compile the requirements.txt which will include the newly released version I then have to add an additional tag to tag the commit committing this new requirements.txt file.

Can anyone recommend a better workflow?

Cheers, Damian



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source