From 08889a556bea49a0bc0f7d6f7265c7a685578eba Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Thu, 30 Jul 2026 13:26:20 +0200 Subject: [PATCH] ci(patch): make platform selection work like the build pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) Claude-Session: https://claude.ai/code/session_01PanTG9kRBi4QTQ2psvpTxP --- .github/workflows/patch.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index c5f0ca29e..e9abd471a 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -3,6 +3,14 @@ name: "Patch" on: workflow_dispatch: inputs: + build_mac: + # Selecting this currently only installs the signing certificates: the + # macOS patch step itself stays disabled until + # https://github.com/OpenBikeControl/bikecontrol/issues/143 is fixed. + description: 'Patch for macOS (patch step disabled, see #143)' + required: false + default: false + type: boolean build_windows: description: 'Patch for Windows' required: false @@ -50,6 +58,9 @@ jobs: build: name: Patch iOS, Android & macOS needs: guard + # Without this, a Windows-only patch still spun up a macOS runner that + # checked out, installed Shorebird and Flutter, then ran no patch step. + if: inputs.build_mac || inputs.build_android || inputs.build_ios runs-on: macos-26 permissions: @@ -140,12 +151,15 @@ jobs: release-version: ${{ inputs.release_version }} args: '--track beta --allow-asset-diffs --allow-native-diffs --split-debug-info=symbols -- --dart-define=VERIFYING_SHARED_SECRET=${{ secrets.VERIFYING_SHARED_SECRET }} --dart-define=REVENUECAT_API_KEY_IOS=${{ secrets.REVENUECAT_API_KEY_IOS }} --dart-define=SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }}' + # build_mac is deliberately not part of these conditions: the macOS patch + # step is disabled (#143), so a macOS-only run produces no symbols/ and + # the zip would fail. Add it back when that patch step is re-enabled. - name: Zip Symbols - if: inputs.build_android || inputs.build_ios || inputs.build_mac + if: inputs.build_android || inputs.build_ios run: zip -P "${{ secrets.ZIP_PASSWORD }}" -r symbols.zip symbols/ - name: Upload Symbols - if: inputs.build_android || inputs.build_ios || inputs.build_mac + if: inputs.build_android || inputs.build_ios uses: actions/upload-artifact@v4 with: overwrite: true