fix(ci/release): quit Xcode.app so it stops pruning the iOS profile

Root cause of 'No profile matching Punktfunk App Store Distribution': the GUI
Xcode.app was running on the runner and actively manages
~/Library/Developer/Xcode/UserData/Provisioning Profiles, pruning our
manually-installed App Store profile from the exact dir xcodebuild reads, right
before signing (the legacy ~/Library/MobileDevice copy survives but Xcode 26's
xcodebuild doesn't read it). Quit Xcode.app at the top of the iOS signing block;
xcodebuild runs independently and headless CI doesn't need the GUI app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-13 19:25:33 +00:00
parent af9a56b86f
commit 5af63d0e9c
+8
View File
@@ -288,6 +288,14 @@ jobs:
echo "::warning::IOS_PROFILE_B64 not set — need an App Store provisioning profile for io.unom.punktfunk. Skipping iOS/TestFlight."
exit 0
fi
# A running Xcode.app actively MANAGES ~/Library/Developer/Xcode/UserData/Provisioning
# Profiles — it prunes manually-installed profiles it doesn't recognise from its
# account, deleting ours from the very dir xcodebuild reads right before signing
# (hence 'No profile matching ...' even though the file was installed). Quit it;
# headless CI doesn't need the GUI Xcode and xcodebuild runs independently.
osascript -e 'tell application "Xcode" to quit' >/dev/null 2>&1 || true
pkill -x Xcode 2>/dev/null || true
sleep 2
# Stage the App Store provisioning profile + read its Name/UUID (the archive +
# export reference it by name; Xcode finds it by UUID under the profiles dirs).
printf '%s' "$IOS_PROFILE_B64" | tr -d '\r\n ' | base64 -d > "$RUNNER_TEMP/appstore.mobileprovision" \