From b547b9d92f97dce6882d56980e7a969972c1edb3 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Sat, 13 Jun 2026 19:25:33 +0000 Subject: [PATCH] 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) --- .gitea/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9b283c1..3f7b771 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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" \