Skip to content

Commit 5e66202

Browse files
Claudeclaude
andcommitted
ci(ios): find IPA dynamically and fix API key JSON generation
The IPA filename from xcodebuild may not match expectations. Use find to locate it. Also use jq to generate the API key JSON instead of a heredoc to avoid whitespace issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cb20726 commit 5e66202

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/ios-release.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,20 @@ jobs:
159159
# Build the API key JSON that fastlane expects
160160
API_KEY_JSON="$RUNNER_TEMP/api_key.json"
161161
P8_CONTENTS=$(cat ~/.private_keys/AuthKey_"$APP_STORE_CONNECT_API_KEY_ID".p8)
162-
cat > "$API_KEY_JSON" <<EOF
163-
{
164-
"key_id": "$APP_STORE_CONNECT_API_KEY_ID",
165-
"issuer_id": "$APP_STORE_CONNECT_ISSUER_ID",
166-
"key": $(echo "$P8_CONTENTS" | jq -Rs .),
167-
"in_house": false
168-
}
169-
EOF
162+
jq -n \
163+
--arg key_id "$APP_STORE_CONNECT_API_KEY_ID" \
164+
--arg issuer_id "$APP_STORE_CONNECT_ISSUER_ID" \
165+
--arg key "$P8_CONTENTS" \
166+
'{key_id: $key_id, issuer_id: $issuer_id, key: $key, in_house: false}' \
167+
> "$API_KEY_JSON"
168+
169+
# Find the IPA (xcodebuild may name it differently)
170+
IPA_PATH=$(find "$RUNNER_TEMP/export" -name '*.ipa' -print -quit)
171+
echo "IPA: $IPA_PATH"
172+
[ -f "$IPA_PATH" ] || { echo "No IPA found in $RUNNER_TEMP/export"; ls -la "$RUNNER_TEMP/export"; exit 1; }
170173
171174
fastlane pilot upload \
172-
--ipa "$RUNNER_TEMP/export/FareBot.ipa" \
175+
--ipa "$IPA_PATH" \
173176
--api_key_path "$API_KEY_JSON" \
174177
--distribute_external false \
175178
--skip_waiting_for_build_processing false \

0 commit comments

Comments
 (0)