Skip to content

Commit

Permalink
Bump CHANGELOG from set_version action
Browse files Browse the repository at this point in the history
This could be done in a _slightly_ more modular fashion but would add
a bit of complexity as well to pass around the file changes across
actions without making multiple commits in the history.

The nice thing about this setup is that bump_changelog.py doesn't mind
at all if you already sorted out the CHANGELOG by hand, so if there
are any difficult/edge cases they can be handled by using a release
branch and running the script locally before using the release action.
  • Loading branch information
ajjackson committed Feb 7, 2025
1 parent 1d6867b commit 30e03c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/set_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ jobs:
sed -i "s/^version:\ .*/version: ${VERSION_NUMBER}/" CITATION.cff
sed -i "s/^date-released:\ .*/date-released: $(date -I)/" CITATION.cff
- name: "Update CHANGELOG.rst"
shell: bash -l {0}
run: python build_utils/bump_changelog.py --replace CHANGELOG.rst ${VERSION_NUMBER}

- name: "Create commit"
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add euphonic/version.py CITATION.cff
git add euphonic/version.py CITATION.cff CHANGELOG.rst
if git diff --cached --quiet
then
Expand Down

0 comments on commit 30e03c9

Please sign in to comment.