feat(workflows): add reusable release-prepare workflow#446
Open
ss-o wants to merge 2 commits into
Open
Conversation
Add a workflow_call entrypoint that prepares - but never publishes - a release for class-2 repositories: on push to the default branch it computes the next semantic version from Conventional Commits since the last vX.Y.Z tag, drafts a changelog with GitHub Models (grouped commit list as fallback), and opens or updates a single release-proposal issue with the draft notes and exact annotated-tag commands. The maintainer-pushed annotated tag remains the only publication act and the per-repo tag-driven release.yml still publishes, so ADR 0007 is unchanged. Document caller usage in runbooks/release.md. Refs #444
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a reusable GitHub Actions workflow to prepare (but not publish) releases for class-2 repositories, plus documentation showing how to wire it in as a caller. It aligns with ADR-0007 by keeping the maintainer-pushed annotated tag as the publication boundary while automating version proposal + draft notes.
Changes:
- Added a reusable
workflow_callworkflow that computes the next semver from Conventional Commits since the lastvX.Y.Ztag, drafts release notes via GitHub Models (with a fallback), and opens/updates a single “release proposal” issue. - Documented how class-2 repos should call the reusable workflow (including required permissions and concurrency guidance).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
runbooks/release.md |
Documents the new class-2 “release preparation automation” and provides a caller workflow snippet. |
.github/workflows/release-prepare.yml |
Implements the reusable release-prep workflow (semver proposal, AI/fallback changelog drafting, issue creation/update). |
…ation Tag commits whose body declares a BREAKING CHANGE footer with a [breaking] marker so the fallback changelog and the AI prompt group them under Breaking changes, matching the major-bump detection in the semver step. Note in both the prompt and the fallback changelog when the commit list is truncated to the 200 most recent commits, and use rev-list --max-count instead of head to avoid SIGPIPE under pipefail. Refs #444
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
.github/workflows/release-prepare.yml, a reusable (workflow_call) workflow for class-2 repositories that prepares a release on push to the default branch without publishing one: it computes the next semantic version from Conventional Commits since the lastvX.Y.Ztag (feat→ minor,fix/perf→ patch,!/BREAKING CHANGE→ major; onlychore/docs/ci→ clean no-op), drafts a changelog with GitHub Models viaactions/ai-inference(grouped commit list as fallback when inference is unavailable), and opens or updates a singlerelease-proposalissue with the draft notes and the exact annotated-tag commands.runbooks/release.md(new "Release preparation automation (class 2)" section with a caller snippet).release.yml(zunit pattern) still publishes, so ADR 0007 is unchanged. Callers ownconcurrency(per fix(trunk): let callers own concurrency #436); the reusable workflow does not set it.Closes #444 tasks 1–2; pilots in
zunit/zsh-lintare follow-ups in those repos.Verification
trunk check(actionlint 1.7.12, shellcheck, markdownlint, prettier): no issues on both changed files.actions/checkout@de0fac2e…=v6.0.2(same pin aszsh-n.yml),actions/ai-inference@a7805884…=v2.1.1.z-shell/zunithistory (v0.6.3→ proposesv0.7.0minor; correctly ignores the non-conformingv0.7.0-alphapre-release tag) and against a synthetic repo for the no-releasable-commits no-op, the!-breaking major bump, and the existing-tag guard.Agent handoff
z-shell/zunitandz-shell/zsh-lint(see Add reusable release-prepare workflow (semver proposal + AI changelog) for class-2 repos #444 task list; relates to zsh-lint#21).🤖 Generated with Claude Code