Skip to content

Commit 25d155b

Browse files
fix(ci): extract provisioning profile UUID via Python plistlib
Both security cms -D and openssl smime fail on macos-26 — the former needs Apple root certs in the keychain, the latter is incompatible with the runner's LibreSSL. Python's plistlib reads the UUID by key name from the embedded XML plist, requiring no external tools or certificates.
1 parent b297396 commit 25d155b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build-release-ios.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ jobs:
6161
run: |
6262
PROFILE="$HOME/Library/MobileDevice/Provisioning Profiles/build_pp.mobileprovision"
6363
if [ ! -s "$PROFILE" ]; then echo "::error::Provisioning profile is missing or empty at $PROFILE"; exit 1; fi
64-
UUID=$(openssl smime -inform DER -verify -noverify -in "$PROFILE" 2>/dev/null | /usr/libexec/PlistBuddy -c "Print :UUID" /dev/stdin)
64+
UUID=$(python3 -c "
65+
import plistlib
66+
with open('$PROFILE', 'rb') as f:
67+
data = f.read()
68+
start = data.find(b'<?xml')
69+
print(plistlib.loads(data[start:])['UUID'])
70+
")
6571
if [ -z "$UUID" ]; then echo "::error::Failed to extract UUID from provisioning profile"; exit 1; fi
6672
echo "UUID=$UUID" >> $GITHUB_ENV
6773
echo "Extracted UUID: $UUID"

0 commit comments

Comments
 (0)