Skip to content

ci(patch): make platform selection work like the build pipeline - #373

Merged
jonasbark merged 1 commit into
6.3from
ci/patch-platform-selection
Jul 30, 2026
Merged

ci(patch): make platform selection work like the build pipeline#373
jonasbark merged 1 commit into
6.3from
ci/patch-platform-selection

Conversation

@jonasbark

Copy link
Copy Markdown
Collaborator

Problem

patch.yml referenced inputs.build_mac in three places but never declared it as a workflow input, so it always evaluated falsy:

$ grep -oE "inputs\.[a-z_]+" .github/workflows/patch.yml | sort -u
inputs.build_android
inputs.build_ios
inputs.build_mac      # <-- never declared
inputs.build_windows
inputs.release_version
inputs.track

Separately, the macOS-runner build job had no if:. Dispatching a Windows-only patch still spun up a macos-26 runner that checked out the repo with submodules, installed Shorebird and Flutter, then ran no patch step at all.

Changes

  • Declare build_mac, mirroring build.yml's per-platform booleans. Default false, and since the macOS patch step is still disabled by Patch doesn't work macOS #143 the toggle only drives certificate install today — the description says so rather than implying macOS gets patched.
  • Gate the macOS-runner job on the platforms it serves: if: inputs.build_mac || inputs.build_android || inputs.build_ios.
  • Symbol zip/upload keep gating on android || ios only. With the macOS patch step disabled, a macOS-only run produces no symbols/ and zip -r symbols.zip symbols/ would fail — adding build_mac there would have introduced a new failure mode. Noted inline for whoever re-enables Patch doesn't work macOS #143.

Input parity with build.yml is now: build_mac, build_windows, build_android, build_ios (build.yml additionally has build_github, which has no patch equivalent).

Verification

Both workflows parse, and neither has a dangling or unused input any more:

.github/workflows/patch.yml
  undeclared but used: none
  declared but unused: none
.github/workflows/build.yml
  undeclared but used: none
  declared but unused: none

actionlint isn't installed locally, so that check didn't run.

Note

Unrelated to this change, but release_version is a free-text string interpolated into the Shorebird args: strings. It's workflow_dispatch-only so it takes repo write access to reach, but it is an injection surface if you ever want to tighten it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PanTG9kRBi4QTQ2psvpTxP

patch.yml referenced inputs.build_mac in three places but never declared it as
a workflow input, so it always evaluated falsy. Declared it, mirroring
build.yml's per-platform booleans. Default is false and the macOS patch step
stays disabled (#143) — the toggle only drives certificate install today, and
its description says so rather than implying macOS gets patched.

Also gated the macOS-runner job on the platforms it actually serves. A
Windows-only patch previously still spun up a macos-26 runner that checked out
the repo, installed Shorebird and Flutter, then ran no patch step at all.

The symbol zip/upload steps deliberately keep gating on android || ios only:
with the macOS patch step disabled, a macOS-only run produces no symbols/ and
`zip -r symbols.zip symbols/` would fail. Noted inline for whoever re-enables
#143.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PanTG9kRBi4QTQ2psvpTxP
Copilot AI review requested due to automatic review settings July 30, 2026 11:27
@jonasbark
jonasbark merged commit 1dd1332 into 6.3 Jul 30, 2026
1 check passed

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.

🟢 Ready to approve

The workflow changes are consistent, syntactically valid, and directly address the undeclared input and unnecessary macOS runner usage without introducing new failure modes.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR fixes platform-selection behavior in the patch.yml GitHub Actions workflow so dispatch inputs align with the build pipeline and macOS runners are only used when necessary.

Changes:

  • Declares the missing build_mac workflow input (boolean, default false) with an explicit note that the macOS patch step remains disabled pending #143.
  • Adds a job-level if: to prevent the macOS runner job from starting on Windows-only dispatches.
  • Removes build_mac from the symbols zip/upload gating to avoid failures when a macOS-only run produces no symbols/.
File summaries
File Description
.github/workflows/patch.yml Adds the missing build_mac input and gates the macOS-runner job and symbols steps to match intended per-platform behavior.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@jonasbark
jonasbark deleted the ci/patch-platform-selection branch July 30, 2026 11:28
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.

2 participants