Closed mbercx closed 1 year ago
Note: even though I think the GitHub workflows are fun to play around with, in hindsight it may be more sensible to have a pre-commit
hook for this. Consider only having to do:
git checkout -b release/v4.3.0
__version__
.git commit -am 'Release v4.3.0'
-> pre-commit
automatically does first draft update of CHANGELOG.md
CHANGELOG.md
git commit -a
git push -u origin
The current workflow is slightly more complicated. After the first two steps:
git commit -am 'Release v4.3.0'
git push -u origin
-> GitHub action automatically does first draft update of CHANGELOG.md
git pull
changes locallyCHANGELOG.md
git commit -a
git push origin
I mean, it's two steps less 😁. That said, the GitHub action allows the check to be more specific to only release/**
branches.
In any case, I'd still have to learn how to actually write a pre-commit
hook, so...
... Of course, we could also just run the script manually now that I think of it. 😅 Not nearly as badass though, but:
.github/scripts/update_changelog.py
-> automatically does first draft update of CHANGELOG.md
CHANGELOG.md
git commit -am 'Release v4.3.0'
git push -u origin
After some discussion it was decided to just convert this into a script the maintainer can run locally. Much more sensible since they can just adapt the CHANGELOG.md
afterwards and then continue with the release.
@sphuber I put the scripts in a dev
folder in the root folder of the repo. We can also start adding scripts there to e.g. trim output files for the text fixtures. What do you think?
Add a GitHub workflow that automatically gathers the commits since the last release tag and prepends the list to the
CHANGELOG.md
. The pull request hashes are also converted into links to the corresponding pull request.