Skip to content

Check version for release#50

Merged
chrisdicaprio merged 2 commits into
mainfrom
check-version-for-release
May 6, 2026
Merged

Check version for release#50
chrisdicaprio merged 2 commits into
mainfrom
check-version-for-release

Conversation

@chrisdicaprio
Copy link
Copy Markdown
Collaborator

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

related GNS-Science/changelog-reader-action#1

- hoist changelog-reader-action before install in python-release.yml and
  python-release-uv.yml so a missing CHANGELOG entry fails immediately,
  before any dependency setup; guarded by startsWith(github.ref,'refs/tags/')
  so non-tag invocations skip cleanly
- fix pre-existing bug: Get version from tag wrote 'name=current_version::VERSION'
  to GITHUB_OUTPUT (always empty); now correctly writes 'current_version=VERSION'
  using GITHUB_REF_NAME
- add tag-prefix and changelog-path inputs (defaults: v, CHANGELOG.md) so
  downstream repos can override without forking the workflow
- add hooks/pre-push-changelog — bash pre-push hook mirroring the CI check,
  configurable via TAG_PREFIX/CHANGELOG_PATH env vars; works on Linux, macOS,
  and Windows (Git Bash)
- add .gitattributes to pin the hook script to LF line endings
- add CHANGELOG.md fixtures to samplePythonProject/ and samplePythonProjectUv/
- document changelog gate behaviour and hook install instructions in README.MD
@chrisdicaprio chrisdicaprio marked this pull request as ready for review May 6, 2026 19:10
@chrisdicaprio chrisdicaprio requested review from chrisbc and voj May 6, 2026 19:10
Copy link
Copy Markdown
Collaborator

@voj voj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@chrisbc chrisbc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisdicaprio chrisdicaprio merged commit 6d90c29 into main May 6, 2026
30 checks passed
@chrisdicaprio chrisdicaprio deleted the check-version-for-release branch May 6, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants