Skip to content

Commit 4a7274b

Browse files
katipallyCopilot
andcommitted
fix(ci): use app-store export method + altool upload, drop cloud signing
method=app-store-connect triggers 'Cloud signing permission error' because it requires cloud-managed distribution certificates (team opt-in needed). Switch to method=app-store which uses the distribution cert already imported into the keychain, then upload IPA via xcrun altool separately. Also reverts CODE_SIGN_IDENTITY overrides — incompatible with Automatic signing style (Xcode rejects the combination with an error). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 41505e1 commit 4a7274b

2 files changed

Lines changed: 30 additions & 16 deletions

File tree

.github/workflows/ios-testflight.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,28 +228,29 @@ jobs:
228228
-authenticationKeyID "${ASC_KEY_ID}" \
229229
-authenticationKeyIssuerID "${ASC_ISSUER_ID}" \
230230
DEVELOPMENT_TEAM="${APPLE_TEAM_ID}" \
231-
CODE_SIGN_IDENTITY="Apple Distribution" \
232231
archive
233232
234233
- name: Write ExportOptions.plist
235234
run: |
236-
cat > "$RUNNER_TEMP/ExportOptions.plist" <<EOF
235+
# method=app-store: traditional cert-based signing (uses dist cert from keychain).
236+
# destination=export: produce a signed IPA locally; upload is a separate step.
237+
# This avoids "Cloud signing permission error" from method=app-store-connect
238+
# which requires cloud-managed distribution certificates.
239+
TEAM_ID="${{ secrets.APPLE_TEAM_ID }}"
240+
cat > "$RUNNER_TEMP/ExportOptions.plist" << PLIST_EOF
237241
<?xml version="1.0" encoding="UTF-8"?>
238242
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
239243
<plist version="1.0">
240244
<dict>
241-
<key>method</key><string>app-store-connect</string>
242-
<key>destination</key><string>upload</string>
243-
<key>teamID</key><string>${{ secrets.APPLE_TEAM_ID }}</string>
244-
<key>signingStyle</key><string>automatic</string>
245+
<key>method</key><string>app-store</string>
246+
<key>teamID</key><string>${TEAM_ID}</string>
245247
<key>uploadSymbols</key><true/>
246-
<key>uploadBitcode</key><false/>
247248
<key>manageAppVersionAndBuildNumber</key><false/>
248249
</dict>
249250
</plist>
250-
EOF
251+
PLIST_EOF
251252
252-
- name: Export & upload to TestFlight
253+
- name: Export archive to IPA
253254
env:
254255
ASC_KEY_ID: ${{ steps.write-api-key.outputs.key_id }}
255256
ASC_ISSUER_ID: ${{ steps.write-api-key.outputs.issuer_id }}
@@ -265,6 +266,26 @@ jobs:
265266
-authenticationKeyPath "${ASC_KEY_PATH}" \
266267
-authenticationKeyID "${ASC_KEY_ID}" \
267268
-authenticationKeyIssuerID "${ASC_ISSUER_ID}"
269+
echo "IPA exported:"
270+
ls -lh "$RUNNER_TEMP/export/"*.ipa 2>/dev/null || ls -lh "$RUNNER_TEMP/export/"
271+
272+
- name: Upload to TestFlight
273+
env:
274+
ASC_KEY_ID: ${{ steps.write-api-key.outputs.key_id }}
275+
ASC_ISSUER_ID: ${{ steps.write-api-key.outputs.issuer_id }}
276+
run: |
277+
IPA_PATH=$(find "$RUNNER_TEMP/export" -name "*.ipa" | head -1)
278+
if [[ -z "$IPA_PATH" ]]; then
279+
echo "::error::No IPA found in export directory"
280+
ls -la "$RUNNER_TEMP/export/"
281+
exit 1
282+
fi
283+
echo "Uploading: $IPA_PATH"
284+
xcrun altool --upload-app \
285+
--type ios \
286+
--file "$IPA_PATH" \
287+
--apiKey "$ASC_KEY_ID" \
288+
--apiIssuer "$ASC_ISSUER_ID"
268289
269290
- name: Clean up API key
270291
if: always()

DoomCoderCompanion/project.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ settings:
2121
SWIFT_STRICT_CONCURRENCY: complete
2222
CODE_SIGN_STYLE: Automatic
2323
OTHER_LDFLAGS: "$(inherited) -ObjC"
24-
configs:
25-
Release:
26-
CODE_SIGN_IDENTITY: "Apple Distribution"
2724

2825
packages:
2926
DoomCoderCore:
@@ -75,7 +72,6 @@ targets:
7572
configs:
7673
Release:
7774
CODE_SIGN_ENTITLEMENTS: DoomCoderCompanion/Resources/DoomCoderCompanion.Release.entitlements
78-
CODE_SIGN_IDENTITY: "Apple Distribution"
7975
dependencies:
8076
- package: DoomCoderCore
8177
- target: NotificationService
@@ -103,9 +99,6 @@ targets:
10399
base:
104100
PRODUCT_BUNDLE_IDENTIFIER: com.doomcoder.app.companion.NotificationService
105101
CODE_SIGN_ENTITLEMENTS: NotificationService/NotificationService.entitlements
106-
configs:
107-
Release:
108-
CODE_SIGN_IDENTITY: "Apple Distribution"
109102
dependencies:
110103
- package: DoomCoderCore
111104

0 commit comments

Comments
 (0)