From 59aa97c7a3870eff0be2b24604b18037298e745f Mon Sep 17 00:00:00 2001 From: Forrest Date: Wed, 14 Oct 2026 13:15:14 -0400 Subject: [PATCH] Codemagic: Harvest Season's signing files and App Store Apple ID Signing by reference name, like the team's Timbre app: the Troglodyte App Store Connect integration, the harvest--seasons certificate, and the App Store profile harvest for com.oatmealgames.harvestseason. Build numbers are one past TestFlight's latest (app 6822823738), 1 when there's none. Co-Authored-By: Claude Opus 5.5 --- codemagic.yaml | 25 ++++++++++++++++++------- docs/ios-test-port.md | 18 +++++++----------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 4916152..97f87f7 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1,21 +1,27 @@ # Codemagic build of the iOS test port (docs/ios-test-port.md): Godot exports the Xcode project # (export_presets.cfg's "iOS" preset, export only), Codemagic signs it, builds the .ipa, and # uploads it to App Store Connect for TestFlight. Starts manually only (no triggering section). -# Fill in the FILL IN value (the App Store Connect API key's name) first. workflows: ios-perf-test: name: iOS perf test (TestFlight) instance_type: mac_mini_m2 max_build_duration: 60 integrations: - app_store_connect: FILL IN # the App Store Connect API key's name in Codemagic's team integrations + app_store_connect: Troglodyte # the team's App Store Connect API key (shared with Timbre) environment: + # Signing files by their reference names in Codemagic (Team settings > Code signing + # identities), fetched into the keychain at build start. ios_signing: - distribution_type: app_store - bundle_identifier: &bundle_id com.oatmealgames.harvestseason + certificates: + - harvest--seasons + provisioning_profiles: + - harvest # App Store profile for com.oatmealgames.harvestseason (expires 2027-10-14) vars: - BUNDLE_ID: *bundle_id + BUNDLE_ID: com.oatmealgames.harvestseason APPLE_TEAM_ID: 823T4Q2T3U + # The app's numeric Apple ID (App Store Connect > the app > App Information): each build is + # numbered one past the latest on TestFlight, so uploads never collide. + APP_STORE_APPLE_ID: 6822823738 GODOT_VERSION: 4.7.2 xcode: latest cache: @@ -44,11 +50,16 @@ workflows: - name: Export the Xcode project script: | set -euo pipefail - # The preset keeps placeholders; the team, bundle ID, and build number come from here. + # The team, bundle ID, and build number come from here (the build number is one past + # TestFlight's latest; 1 when there's none yet). + latest=$(app-store-connect get-latest-testflight-build-number "$APP_STORE_APPLE_ID" 2>/dev/null || echo 0) + [[ "$latest" =~ ^[0-9]+$ ]] || latest=0 + build=$(( latest + 1 )) + echo "Build number $build" sed -i '' \ -e "s/^application\/app_store_team_id=.*/application\/app_store_team_id=\"$APPLE_TEAM_ID\"/" \ -e "s/^application\/bundle_identifier=.*/application\/bundle_identifier=\"$BUNDLE_ID\"/" \ - -e "s/^application\/version=.*/application\/version=\"$BUILD_NUMBER\"/" \ + -e "s/^application\/version=.*/application\/version=\"$build\"/" \ export_presets.cfg mkdir -p build/ios "$GODOT" --headless --path . --export-release "iOS" build/ios/HarvestSeason.ipa diff --git a/docs/ios-test-port.md b/docs/ios-test-port.md index 2f89d47..761970d 100644 --- a/docs/ios-test-port.md +++ b/docs/ios-test-port.md @@ -29,17 +29,13 @@ To see the phone build on desktop: `godot --path . --rendering-method mobile -- internet on port 2222. Codemagic reads `codemagic.yaml` from the branch it builds. 2. **App ID** (developer.apple.com > Certificates, Identifiers & Profiles > Identifiers > +): done: explicit `com.oatmealgames.harvestseason`, default capabilities. -3. **App record** (appstoreconnect.apple.com > Apps > + > New App): iOS, that bundle ID, any SKU. - Then TestFlight > Internal Testing > + : a group with automatic distribution, with you in it. -4. **API key** (App Store Connect > Users and Access > Integrations > App Store Connect API > - Team Keys > +, role App Manager). Download the .p8 once. In Codemagic: Team settings > Team - integrations > Developer Portal > Manage keys > add it (issuer ID, key ID, .p8) and name it. -5. **Signing** (Codemagic: Team settings > codemagic.yaml settings > Code signing identities): - iOS certificates > generate an Apple Distribution certificate (or upload your .p12), then iOS - provisioning profiles > fetch an App Store profile for the bundle ID. -6. **Fill in** the `FILL IN` value in `codemagic.yaml`: the key's name from step 4. The bundle ID - (`com.oatmealgames.harvestseason`) and Team ID (`823T4Q2T3U`) are already set there and in - the iOS preset. +3. **App record:** done (Apple ID `6822823738`, in `codemagic.yaml` for build numbers). In + TestFlight > Internal Testing > + : a group with automatic distribution, with you in it. +4. **API key:** done. The team's key is the Codemagic integration `Troglodyte` (shared with Timbre). +5. **Signing:** done (Codemagic: Team settings > codemagic.yaml settings > Code signing + identities). Certificate `harvest--seasons`; App Store profile `harvest` for + `com.oatmealgames.harvestseason`, expiring 2027-10-14. Both are referenced by name in + `codemagic.yaml`. The app has to be in the same Codemagic team as these signing files. ## Build and install