Skip to content

Commit 038b195

Browse files
PGMacDesign2claude
andcommitted
Extract signing identity from keychain instead of hardcoding
Xcode 26.3 maps "Apple Distribution" to "iOS Distribution" internally, causing a mismatch with the actual certificate name in the keychain. Now we dynamically extract the real identity name using security find-identity and mask it in logs for security. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 714e085 commit 038b195

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/deploy-testflight.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
# Add keychain to search list
7575
security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | tr -d '"')
7676
77+
# Extract signing identity name from imported certificate
78+
SIGNING_IDENTITY=$(security find-identity -v -p codesigning "$KEYCHAIN_PATH" | head -1 | sed 's/.*"\(.*\)"/\1/')
79+
echo "::add-mask::$SIGNING_IDENTITY"
80+
echo "SIGNING_IDENTITY=$SIGNING_IDENTITY" >> $GITHUB_ENV
81+
7782
- name: Install provisioning profile
7883
env:
7984
IOS_PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }}
@@ -117,7 +122,7 @@ jobs:
117122
-archivePath "$RUNNER_TEMP/Runner.xcarchive" \
118123
-destination "generic/platform=iOS" \
119124
CODE_SIGN_STYLE=Manual \
120-
CODE_SIGN_IDENTITY="Apple Distribution" \
125+
CODE_SIGN_IDENTITY="$SIGNING_IDENTITY" \
121126
PROVISIONING_PROFILE_SPECIFIER="" \
122127
PROVISIONING_PROFILE="$PROFILE_UUID" \
123128
DEVELOPMENT_TEAM="$APPLE_TEAM_ID"

0 commit comments

Comments
 (0)