You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #50 from GNS-Science/check-version-for-release
Enforce presence of changelog entry that matches the `v*` version tag when releasing python package.
- changelog-reader-action was already present in our workflow which will fail if a changelog entry for the version is not present. It has been moved higher in the workflow to fail early.
- a new git pre-push hook that can be added to any project to prevent missing changelog entry
Copy file name to clipboardExpand all lines: README.MD
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ Creates a GitHub release and publishes the package to PyPI. Would commonly be on
30
30
31
31
Requires the secret `PYPI_API_TOKEN`.
32
32
33
+
When triggered by a version tag, the workflow verifies that `CHANGELOG.md` contains a `## [VERSION]` section matching the tag before proceeding. It fails fast (before installing dependencies) if the entry is missing.
See [deploy-to-aws.yml](./.github/workflows/deploy-to-aws.yml) for a list of supported and required list of secrets and environment variables as well as workflow inputs.
132
+
133
+
## Pre-push changelog hook
134
+
135
+
A local git hook is available at [`hooks/pre-push-changelog`](./hooks/pre-push-changelog). It performs the same changelog-entry check as the release workflows, blocking a version tag push before it reaches CI.
136
+
137
+
### Install
138
+
139
+
Run once per repository checkout. On Windows, use Git Bash (not PowerShell or cmd).
0 commit comments