Skip to content

Add patch releases to the release automation - #922

Merged
LikeTheSalad merged 3 commits into
mainfrom
feature/android-patch-releases
Sep 28, 2026
Merged

LikeTheSalad merged 3 commits into
mainfrom
feature/android-patch-releases

Conversation

@LikeTheSalad

@LikeTheSalad LikeTheSalad commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds patch releases to the release automation. A patch ships fixes for a released x.y.z as x.y.(z+1) without unreleased main work. The operator starts a patch from a release line, adds fixes through pull requests into the patch branch, and then uses the existing Prepare release and Publish release workflows.

Most of the finalize-release.sh diff re-indents the existing ending for a release from main under a new condition. Hiding whitespace in the diff view shows the real change.

Changes

  • Add the Start patch workflow and script. It resolves the highest vX.Y.* tag of the requested line, creates patching/x.y.z from it, and cherry-picks the selected merged main pull requests with -x. It pushes only after every cherry-pick succeeds. It stops when the line has no release, when the release predates this automation, when the patch branch already exists, or on a cherry-pick conflict.
  • Add highest-tag <line>, next-patch, and previous-tag <ref-name> to version.sh. previous-tag is the one rule for the tag a release follows, used by both Prepare release and the release-notes draft, so a draft dispatched on a patch branch starts at that branch's source tag.
  • Resolve a cherry-picked commit with no pull request of its own through its (cherry picked from commit <sha>) trailer in pr-range.sh, and exclude patch-notes/* pull requests.
  • Accept Prepare release from patching/x.y.z. The version comes from the branch name, the branch must contain the previous tag, a version that is already tagged is refused, breaking items are refused, and applies_to metadata is left unchanged.
  • Add a patch ending to finalize-release.sh. It opens a notes-only pull request from patch-notes/x.y.z into main with the section inserted in version order, and reuses a notes branch left by a failed run. As in the release from main, the operator deletes the patching/x.y.z and releasing/x.y.z branches afterwards.
  • Reword the Slack success message to "PR into main" so it fits both endings.
  • Extend the release wizard and RELEASING.md with the patch path and its failure and recovery cases.

Start patch cuts patching/x.y.z from the highest tag of a release line and
cherry-picks chosen main pull requests with -x. Prepare release accepts a
patch branch, derives the version from its name, validates the source tag
and unchanged version file, and refuses breaking items. Finalize opens a
notes-only pull request into main for a patch, reusing a notes branch left
by a failed run, and deletes the patching and releasing branches with a
lease on their validated tips. The release guide and wizard cover the
patch path.
@LikeTheSalad
LikeTheSalad requested a lite review from Copilot September 28, 2026 09:57
@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Resolve the patch-capability validation gap and preserve an in-flight notes marker until the notes pull request is merged.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds automated patch-release support for Android release lines, including branch creation, cherry-picking, preparation, finalization, documentation, and wizard guidance.

Changes:

  • Adds patch-start workflows and version helpers.
  • Extends release preparation, PR-range, and finalization logic.
  • Documents patch workflows and recovery procedures.
File Description
skills/​android-release-wizard/​SKILL.md Documents patch-release operation.
RELEASING.md Adds patch workflow and recovery guidance.
.github/​workflows/​start-patch.yml Defines patch-start workflow.
.github/​workflows/​prepare-release.yml Allows patch branches.
.github/​workflows/​publish-release.yml Generalizes success messaging.
.github/​scripts/​release/​version.sh Adds patch version operations.
.github/​scripts/​release/​start-patch.sh Creates patch branches and cherry-picks fixes.
.github/​scripts/​release/​prepare-release.sh Validates and prepares patch releases.
.github/​scripts/​release/​pr-range.sh Resolves cherry-picked pull requests.
.github/​scripts/​release/​finalize-release.sh Finalizes patches and manages branches.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/scripts/release/start-patch.sh
Leave branch deletion to the operator, as in the main flow. Reuse a pushed
notes branch as is, check only that a patch branch contains its source
tag, and let version.sh own release-line validation.
version.sh previous-tag owns the rule for the tag a release follows.
Prepare release and the release-notes draft both use it, so a draft from a
patch branch starts at that branch's source tag and does not re-list an
earlier patch's fixes. Prepare release also refuses a patch branch whose
version is already tagged, before it pushes anything.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Five moderate issues remain in finalization, stale-branch validation, support detection, duplicate handling, and concurrency.

Review effort: Lite
Findings: 1 Medium severity

Open (1)

@LikeTheSalad
LikeTheSalad marked this pull request as ready for review September 28, 2026 10:43
@LikeTheSalad
LikeTheSalad requested review from a team as code owners September 28, 2026 10:43
@LikeTheSalad
LikeTheSalad merged commit 4da2013 into main Sep 28, 2026
15 checks passed
@LikeTheSalad
LikeTheSalad deleted the feature/android-patch-releases branch September 29, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants