7676 mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
7777 cp "$PROFILE" "$HOME/Library/MobileDevice/Provisioning Profiles/"
7878
79-
8079 - name : Show build settings
8180 run : |
8281 cd ios/App
@@ -85,39 +84,61 @@ jobs:
8584 -scheme "App" \
8685 -configuration "Release Production" | egrep "CODE_SIGN|PROVISION|PRODUCT_BUNDLE_IDENTIFIER|DEVELOPMENT_TEAM"
8786
88- - name : Build archive
89- env :
90- TEAM_ID : ${{ secrets.APPSTORE_TEAM_ID }}
87+ - name : Show code signing identities
9188 run : |
92- set -euo pipefail
93- cd ios/App
94- xcodebuild \
95- -workspace "App.xcworkspace" \
96- -scheme "App" \
97- -configuration "Release Production" \
98- -archivePath "$GITHUB_WORKSPACE/App.xcarchive" \
99- -destination "generic/platform=iOS" \
100- DEVELOPMENT_TEAM="$TEAM_ID" \
101- CODE_SIGN_STYLE=Manual \
102- CODE_SIGNING_ALLOWED=NO \
103- CODE_SIGNING_REQUIRED=NO \
104- CODE_SIGN_IDENTITY="" \
105- PROVISIONING_PROFILE_SPECIFIER="" \
106- PROVISIONING_PROFILE="" \
107- clean archive
108-
109- - name : Export IPA
110- env :
111- EXPORT_PLIST_B64 : ${{ secrets.IOS_EXPORT_PRODUCTION }}
89+ security find-identity -v -p codesigning
90+
91+ - name : Inspect provisioning profile
11292 run : |
113- set -euo pipefail
114- EXPORT_PLIST=$RUNNER_TEMP/ExportOptions.plist
115- echo -n "$EXPORT_PLIST_B64" | base64 --decode > "$EXPORT_PLIST"
116- cd ios/App
117- xcodebuild -exportArchive \
118- -archivePath "$GITHUB_WORKSPACE/App.xcarchive" \
119- -exportOptionsPlist "$EXPORT_PLIST" \
120- -exportPath "$RUNNER_TEMP/export"
93+ PROFILE=$(ls "$HOME/Library/MobileDevice/Provisioning Profiles"/*.mobileprovision | head -n1)
94+ security cms -D -i "$PROFILE" > $RUNNER_TEMP/profile.plist
95+ echo "Profile Name: $(/usr/libexec/PlistBuddy -c 'Print Name' $RUNNER_TEMP/profile.plist)"
96+ echo "Bundle ID: $(/usr/libexec/PlistBuddy -c 'Print Entitlements:application-identifier' $RUNNER_TEMP/profile.plist)"
97+ # Print SHA-1 fingerprints of DeveloperCertificates embedded in the profile
98+ python3 - <<'PY'
99+ import plistlib, base64, subprocess, os
100+ p=plistlib.load(open(os.environ['RUNNER_TEMP']+'/profile.plist','rb'))
101+ for i, der_b64 in enumerate(p.get('DeveloperCertificates', [])):
102+ der = base64.b64decode(der_b64)
103+ path = f"{os.environ['RUNNER_TEMP']}/cert{i}.cer"
104+ open(path,'wb').write(der)
105+ out = subprocess.check_output(['openssl','x509','-inform','DER','-in',path,'-noout','-subject','-serial','-fingerprint','-sha1']).decode()
106+ print(f"Profile cert[{i}]:\n{out}")
107+ PY
108+
109+ # - name: Build archive
110+ # env:
111+ # TEAM_ID: ${{ secrets.APPSTORE_TEAM_ID }}
112+ # run: |
113+ # set -euo pipefail
114+ # cd ios/App
115+ # xcodebuild \
116+ # -workspace "App.xcworkspace" \
117+ # -scheme "App" \
118+ # -configuration "Release Production" \
119+ # -archivePath "$GITHUB_WORKSPACE/App.xcarchive" \
120+ # -destination "generic/platform=iOS" \
121+ # DEVELOPMENT_TEAM="$TEAM_ID" \
122+ # CODE_SIGN_STYLE=Manual \
123+ # CODE_SIGNING_ALLOWED=NO \
124+ # CODE_SIGNING_REQUIRED=NO \
125+ # CODE_SIGN_IDENTITY="" \
126+ # PROVISIONING_PROFILE_SPECIFIER="" \
127+ # PROVISIONING_PROFILE="" \
128+ # clean archive
129+
130+ # - name: Export IPA
131+ # env:
132+ # EXPORT_PLIST_B64: ${{ secrets.IOS_EXPORT_PRODUCTION }}
133+ # run: |
134+ # set -euo pipefail
135+ # EXPORT_PLIST=$RUNNER_TEMP/ExportOptions.plist
136+ # echo -n "$EXPORT_PLIST_B64" | base64 --decode > "$EXPORT_PLIST"
137+ # cd ios/App
138+ # xcodebuild -exportArchive \
139+ # -archivePath "$GITHUB_WORKSPACE/App.xcarchive" \
140+ # -exportOptionsPlist "$EXPORT_PLIST" \
141+ # -exportPath "$RUNNER_TEMP/export"
121142
122143 # - name: Save App Store Connect API key (.p8)
123144 # env:
0 commit comments