ci: guard version / tag / CHANGELOG consistency#87
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ymluses-p:Version=${GITHUB_REF_NAME#v}), whileDirectory.Build.props <Version>anddocs/CHANGELOG.mdare edited by hand — this closes the gap between them.release.ymlgains aguardjob (whichpublishnowneeds) that fails the release, before any artifact is published, if the pushed tag does not matchDirectory.Build.props <Version>or the CHANGELOG has no matching## [x.y.z]section.pr.ymlgains aversion / CHANGELOG synccheck 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.