From 6c5f72f31a977e9de1fd656f31c35b096b51db74 Mon Sep 17 00:00:00 2001 From: test Date: Wed, 22 Jul 2026 13:18:15 -0400 Subject: [PATCH] Fix: Register CHANGELOG.md as a commit pattern in the release hook axion-release's built-in commit hook only stages files explicitly registered via HookContext.addCommitPattern() - it does not commit all working-tree changes. Our changelog-patching hook wrote CHANGELOG.md to disk but never registered it, so the release commit was empty and the patched changelog was discarded. Verified the fix locally with axion's release.localOnly mode in an isolated worktree: the resulting commit now includes the changelog diff (new version header, moved entries, regenerated compare links). This bug caused the real v0.3.0 release to go out with an unpatched CHANGELOG.md and an empty release commit, which in turn made the git-release action fail (it couldn't find a "0.3.0" section) - no GitHub release or package was published for that tag. The v0.3.0 tag is being deleted and the release re-run after this merges. --- CHANGELOG.md | 1 + build.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe9ebf1..e89fdbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### Fixed - Release workflow authenticates via an SSH deploy key (`COMMIT_KEY`) instead of a stale PAT +- Release commit now actually stages `CHANGELOG.md` (axion's commit hook only commits explicitly registered patterns, so the changelog patch was previously silently dropped) ## [0.2.0] - 2022-11-27 ### Added diff --git a/build.gradle.kts b/build.gradle.kts index c6ff32e..fc7ec19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,10 @@ scmVersion { versionIncrementer("incrementMinorIfNotOnRelease", mapOf("releaseBranchPattern" to "release/.+")) hooks { - pre { context: HookContext -> patchChangelogToVersion(context.releaseVersion) } + pre { context: HookContext -> + patchChangelogToVersion(context.releaseVersion) + context.addCommitPattern("CHANGELOG.md") + } pre("commit") } }