Skip to content

ci: guard version / tag / CHANGELOG consistency#87

Merged
ShortArrow merged 1 commit into
mainfrom
ci/version-changelog-guard
Jul 22, 2026
Merged

ci: guard version / tag / CHANGELOG consistency#87
ShortArrow merged 1 commit into
mainfrom
ci/version-changelog-guard

Conversation

@ShortArrow

Copy link
Copy Markdown
Owner

Adds two cheap guards so the hand-maintained version number, the v* release tag, and the CHANGELOG cannot drift apart. The published version is derived from the tag (release.yml uses -p:Version=${GITHUB_REF_NAME#v}), while Directory.Build.props <Version> and docs/CHANGELOG.md are edited by hand — this closes the gap between them.

  • release.yml gains a guard job (which publish now needs) that fails the release, before any artifact is published, if the pushed tag does not match Directory.Build.props <Version> or the CHANGELOG has no matching ## [x.y.z] section.
  • pr.yml gains a version / CHANGELOG sync check that fails a PR whose <Version> has no matching CHANGELOG entry — catching a bump that forgot the changelog (or a changelog entry without the bump) at review time.

Both are pure shell + grep/sed, no new dependencies. Logic verified locally against matching, mismatched, and the real 0.2.8 cases.

The published version is derived from the pushed `v*` tag, while
Directory.Build.props <Version> and docs/CHANGELOG.md are maintained by hand —
so a tag can drift from either. Add two cheap guards:

- release.yml gains a `guard` job (which `publish` now needs) that fails the
  release if the tag does not match Directory.Build.props <Version> or the
  CHANGELOG has no matching `## [x.y.z]` section — blocking a mis-tagged
  release before any artifact is published.
- pr.yml gains a `version / CHANGELOG sync` check that fails a PR whose
  <Version> has no matching CHANGELOG entry, catching a bump that forgot the
  changelog (or vice versa) at review time.
@ShortArrow
ShortArrow merged commit 1db4702 into main Jul 22, 2026
6 checks passed
@ShortArrow
ShortArrow deleted the ci/version-changelog-guard branch July 22, 2026 04:41
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.

1 participant