iOS TestFlight: override signing in Release.xcconfig for CI

The committed project.pbxproj Release config uses CODE_SIGN_STYLE =
Automatic + CODE_SIGN_IDENTITY = "Apple Development" — both set up for
local Xcode-signed-into-an-Apple-ID development workflow. CI has only
the Distribution cert + provisioning profile we install into a temp
keychain, no Apple ID session, so Automatic signing fails at archive
time.

Append manual-signing overrides to ios/Flutter/Release.xcconfig in CI
(xcconfig values take precedence over pbxproj defaults, so this
overrides without modifying the committed project file):
  CODE_SIGN_IDENTITY = Apple Distribution
  CODE_SIGN_STYLE = Manual
  DEVELOPMENT_TEAM = ${APPLE_TEAM_ID}
  PROVISIONING_PROFILE_SPECIFIER = ${PROFILE_NAME}

PROFILE_NAME is parsed earlier from the .mobileprovision Name field.
APPLE_TEAM_ID comes from the existing Gitea secret. Local Debug/Profile
builds remain on Automatic signing — unchanged.
This commit is contained in:
jwinterm
2026-06-01 18:30:34 -04:00
parent 59d7833668
commit e6195d1e98
@@ -284,6 +284,28 @@ jobs:
cd ios
pod install --repo-update
# ---- Override signing in Release.xcconfig for the archive step ------
# The committed project.pbxproj Release config uses Automatic signing
# + "Apple Development" identity (set up for local dev with Xcode
# signed into an Apple ID). CI can't do Automatic signing — it has
# only the cert + provisioning profile we installed in the temp
# keychain. Append manual-signing overrides to Release.xcconfig;
# xcconfig values take precedence over pbxproj defaults.
- name: Override signing settings for archive
env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
set -x
cat >> ios/Flutter/Release.xcconfig <<XCFG
// CI-only signing overrides (appended at build time, not committed).
CODE_SIGN_IDENTITY = Apple Distribution
CODE_SIGN_STYLE = Manual
DEVELOPMENT_TEAM = ${APPLE_TEAM_ID}
PROVISIONING_PROFILE_SPECIFIER = ${PROFILE_NAME}
XCFG
tail -8 ios/Flutter/Release.xcconfig
# ---- Generate ExportOptions.plist + build IPA -----------------------
- name: Write ExportOptions.plist
env: