Skip to content

feat(workflows): add reusable release-prepare workflow#446

Open
ss-o wants to merge 2 commits into
mainfrom
feature-444-release-prepare
Open

feat(workflows): add reusable release-prepare workflow#446
ss-o wants to merge 2 commits into
mainfrom
feature-444-release-prepare

Conversation

@ss-o

@ss-o ss-o commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds .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 last vX.Y.Z tag (feat → minor, fix/perf → patch, !/BREAKING CHANGE → major; only chore/docs/ci → clean no-op), drafts a changelog with GitHub Models via actions/ai-inference (grouped commit list as fallback when inference is unavailable), and opens or updates a single release-proposal issue with the draft notes and the exact annotated-tag commands.
  • Documents caller usage in runbooks/release.md (new "Release preparation automation (class 2)" section with a caller snippet).
  • The maintainer-pushed annotated tag remains the only publication act and the per-repo tag-driven release.yml (zunit pattern) still publishes, so ADR 0007 is unchanged. Callers own concurrency (per fix(trunk): let callers own concurrency #436); the reusable workflow does not set it.

Closes #444 tasks 1–2; pilots in zunit/zsh-lint are follow-ups in those repos.

Verification

  • trunk check (actionlint 1.7.12, shellcheck, markdownlint, prettier): no issues on both changed files.
  • Action SHAs verified against official tags via the GitHub API: actions/checkout@de0fac2e… = v6.0.2 (same pin as zsh-n.yml), actions/ai-inference@a7805884… = v2.1.1.
  • Version-computation and changelog-grouping scripts dry-run verbatim against real z-shell/zunit history (v0.6.3 → proposes v0.7.0 minor; correctly ignores the non-conforming v0.7.0-alpha pre-release tag) and against a synthetic repo for the no-releasable-commits no-op, the !-breaking major bump, and the existing-tag guard.

Note: local commit/push hooks are currently broken repo-wide by the stale sh-hook trunk action (#445); this PR was pushed with --no-verify after trunk check passed manually.

Agent handoff

🤖 Generated with Claude Code

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
Copilot AI review requested due to automatic review settings June 12, 2026 15:52
@ss-o ss-o requested a review from a team as a code owner June 12, 2026 15:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_call workflow that computes the next semver from Conventional Commits since the last vX.Y.Z tag, 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).

Comment thread .github/workflows/release-prepare.yml Outdated
Comment thread .github/workflows/release-prepare.yml
…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
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.

Add reusable release-prepare workflow (semver proposal + AI changelog) for class-2 repos

2 participants