mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:55:42 +00:00
Use API key auth for iOS export to prevent Xcode-Token expiry failures (#6397)
The exportArchive step was relying on the Xcode-Token in the keychain for App Store Connect authentication. This token expires periodically, breaking headless CI builds. Pass the App Store Connect API key (already used by the upload step) to the export step as well. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -110,11 +110,24 @@ echo "=== Debug: Export options plist ==="
|
||||
cat "$EXPORT_OPTIONS_PLIST"
|
||||
echo "=== End debug ==="
|
||||
|
||||
# Export IPA (removed -allowProvisioningUpdates as we're using manual signing)
|
||||
# Export IPA with App Store Connect API key authentication.
|
||||
# Without the API key, xcodebuild falls back to the Xcode-Token in the
|
||||
# keychain, which expires periodically and breaks headless CI builds.
|
||||
EXPORT_AUTH_ARGS=()
|
||||
if [ -n "${APP_STORE_CONNECT_API_KEY_PATH:-}" ] && [ -n "${APP_STORE_CONNECT_API_KEY_ID:-}" ] && [ -n "${APP_STORE_CONNECT_API_ISSUER_ID:-}" ]; then
|
||||
echo "Using App Store Connect API key for export authentication"
|
||||
EXPORT_AUTH_ARGS=(
|
||||
-authenticationKeyPath "$APP_STORE_CONNECT_API_KEY_PATH"
|
||||
-authenticationKeyID "$APP_STORE_CONNECT_API_KEY_ID"
|
||||
-authenticationKeyIssuerID "$APP_STORE_CONNECT_API_ISSUER_ID"
|
||||
)
|
||||
fi
|
||||
|
||||
xcodebuild -exportArchive \
|
||||
-archivePath "$ARCHIVE_PATH" \
|
||||
-exportPath "$EXPORT_PATH" \
|
||||
-exportOptionsPlist "$EXPORT_OPTIONS_PLIST"
|
||||
-exportOptionsPlist "$EXPORT_OPTIONS_PLIST" \
|
||||
"${EXPORT_AUTH_ARGS[@]}"
|
||||
|
||||
# Find and rename the IPA to a consistent name
|
||||
IPA_FILE=$(find "$EXPORT_PATH" -name "*.ipa" | head -1)
|
||||
|
||||
Reference in New Issue
Block a user