ci: automated changelog + release-notes blog post on tag - #6
Merged
Conversation
On tagging a release (git tag vX.Y.Z, pushed to a N.N.x/main branch), a new
workflow walks the first-parent history since the previous tag, resolving
each merged PR's title (falling back to the commit itself for anything
pushed directly) and grouping entries by their Conventional Commits prefix
(feat/fix/perf/refactor/docs/test/build/ci/chore/style/revert, with an
"Other Changes" catch-all for anything that doesn't parse - expected for
pre-adoption history).
From that it generates/updates:
- Archie/CHANGELOG.md - the file Archie/build.gradle.kts's (currently
debug-only) modpublisher config already expects at `changelog =
file("CHANGELOG.md")`, which didn't exist until now.
- a dated Archie/docs/news/posts/<version>.md entry, using the mkdocs-material
blog plugin already configured in Archie/mkdocs.yml (blog_dir: news) -
picked up automatically by the next docs.yaml deploy.
Both land via an auto-opened PR against the tagged branch, not a direct push.
Since the changelog is sourced from PR titles, adds a PR-title lint workflow
enforcing the Conventional Commits format going forward (existing/pre-adoption
history is untouched and simply buckets into "Other Changes"). Documented the
requirement, and the release-cutting process, in AGENTS.md.
Verified .github/scripts/generate_release_notes.py end to end (dry-run and
real file output) against this repo's actual recent history, including both
a real merged-PR entry (correctly resolving its true title via `gh pr view`,
not the generic merge-commit subject) and several free-form direct commits
falling into "Other Changes" as expected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated release-notes pipeline that generates a Keep-a-Changelog-style Archie/CHANGELOG.md entry and an mkdocs-material docs/news post when a version tag is pushed, and adds PR-title linting to keep changelog inputs (PR titles) Conventional-Commits-shaped.
Changes:
- Add a tag-triggered workflow to generate changelog + news post and open a PR with those updates.
- Add PR-title Conventional Commits enforcement via a dedicated workflow.
- Introduce the release-notes generator script and document the convention/release flow in
AGENTS.md(plus Python gitignore hygiene).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Archie/CHANGELOG.md | Adds the initial changelog header/preamble used by the generator and build publishing. |
| AGENTS.md | Documents PR-title Conventional Commits requirements and release-note automation behavior. |
| .gitignore | Ignores Python bytecode/cache artifacts introduced by the new generator script. |
| .github/workflows/release-notes.yaml | New workflow to generate changelog + blog post on tag push and open a PR. |
| .github/workflows/pr-title-lint.yml | New workflow to enforce Conventional Commits formatting on PR titles. |
| .github/scripts/generate_release_notes.py | Implements generation logic for changelog sections and mkdocs news posts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| id: base | ||
| run: | | ||
| git fetch origin --prune | ||
| BRANCH=$(git branch -r --contains "${{ github.sha }}" \ |
Comment on lines
+8
to
+14
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
|
|
Comment on lines
+23
to
+24
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Member
Author
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
This was referenced Aug 6, 2026
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.
Summary
Sets up automated
CHANGELOG.mdanddocs/newsblog-post generation, triggered on git tags (per discussion)..github/workflows/release-notes.yaml— on pushing a tag matchingv*to aN.N.x/mainbranch, walks the first-parent commit history since the previous tag, resolves each merged PR's real title viagh pr view(falling back to the commit subject for anything pushed directly to the branch), and groups entries by their Conventional Commits prefix. Opens a PR (doesn't push directly) updating:Archie/CHANGELOG.md— new version section prepended, Keep-a-Changelog style. This is also the fileArchie/build.gradle.kts's modpublisher config already expects atchangelog = file("CHANGELOG.md")— it didn't exist until now.Archie/docs/news/posts/<version>.md— a dated blog post using the mkdocs-material blog plugin already configured inmkdocs.yml(blog_dir: news), picked up automatically by the nextdocs.yamldeploy..github/workflows/pr-title-lint.yml— since the changelog is sourced from PR titles, enforces Conventional Commits on PR titles going forward (amannn/action-semantic-pull-request). Pre-adoption history and any title that doesn't parse falls into a catch-all "Other Changes" section rather than being dropped..github/scripts/generate_release_notes.py— the generator itself.AGENTS.md— documents the PR-title convention and how to cut a release.Follow-up: fixing an ordering conflict with modpublisher's own tag/release publishing
modpublisher'schangelog = file("CHANGELOG.md")reads that file straight off disk at publish time — it has no idea about git tags or PRs.release-notes.yamlis reactive: it only generates a release's changelog entry after seeing the tag pushed, landing it via a PR that needs a human merge. Ifmodpublishercreates the tag itself as part of the same./gradlew publish*invocation that readschangelog, that's a hard ordering conflict (not a race — the entry structurally can't exist yet), and if that invocation runs in CI under the defaultGITHUB_TOKEN, the tag it creates won't even firerelease-notes.yamlat all (GitHub's anti-recursion rule for that token).Fixed by adding a
generateChangelogGradle task (Archie/build.gradle.kts) thatpublishCurseforge/publishModrinth/publishGitHub/publishModalldependsOn— it regeneratesCHANGELOG.mdsynchronously, right before any publish task reads it, with no GitHub Actions dependency at all (works locally or in CI regardless of token/trigger semantics).release-notes.yamlstill owns thedocs/newsblog post, which has no such ordering requirement.How to cut a release
(or
./gradlew publishMod, etc., once GitHub-release publishing is actually turned on — either path now keepsCHANGELOG.mdcorrect.)Test plan
--range-end HEADand a not-yet-real--new-tag) verified against this repo's actual history, including the no-previous-tag root-commit fallback./gradlew publishCurseforge/publishModrinth/publishGitHub/publishMod --dry-runconfirmsgenerateChangelogis correctly ordered before each./gradlew generateChangelogfor real once to verify end-to-end, then reverted the resultingCHANGELOG.md(that was a verification run, not a real release)release-notes.yamlworkflow (no tags exist in this repo yet) — first real tag push is the true end-to-end verification of that half🤖 Generated with Claude Code