feat: automate changelog updates in pypi-publish workflow#55
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d0cde7c34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run: | | ||
| VERSION="${{ steps.bump.outputs.version }}" | ||
| DATE=$(date +%Y-%m-%d) | ||
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") |
There was a problem hiding this comment.
Use tag before HEAD when deriving changelog range
When this workflow runs on the release trigger, checkout is at the release tag commit, so git describe --tags --abbrev=0 resolves to that same tag. The subsequent range ${PREVIOUS_TAG}..HEAD is therefore empty, which produces changelog entries without the commits for the released changes. This makes release notes inaccurate specifically for tag-triggered publishes.
Useful? React with 👍 / 👎.
This PR automates the process of updating the CHANGELOG.md file whenever a new version is published to PyPI.
Changes:
This ensures that the project history is consistently maintained without manual intervention during the release process.