Skip to content

Commit 8579eb8

Browse files
author
ebreen
committed
fix(distribution): use manual signing with provisioning profiles for Developer ID export
1 parent 1eba94c commit 8579eb8

1 file changed

Lines changed: 32 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ jobs:
4747
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
4848
security list-keychain -d user -s "$KEYCHAIN_PATH"
4949
50+
- name: Install provisioning profiles
51+
env:
52+
APP_PROFILE_BASE64: ${{ secrets.APP_PROVISION_PROFILE_BASE64 }}
53+
EXT_PROFILE_BASE64: ${{ secrets.EXT_PROVISION_PROFILE_BASE64 }}
54+
run: |
55+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
56+
echo -n "$APP_PROFILE_BASE64" | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/CloudMount.provisionprofile
57+
echo -n "$EXT_PROFILE_BASE64" | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/CloudMountExtension.provisionprofile
58+
5059
- name: Generate Xcode project
5160
run: xcodegen generate
5261

@@ -68,41 +77,47 @@ jobs:
6877
- name: Archive
6978
env:
7079
TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
71-
API_KEY_ID: ${{ secrets.API_KEY_ID }}
72-
API_ISSUER_ID: ${{ secrets.API_ISSUER_ID }}
80+
SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
7381
run: |
7482
xcodebuild archive \
7583
-project CloudMount.xcodeproj \
7684
-scheme CloudMount \
7785
-archivePath "$RUNNER_TEMP/CloudMount.xcarchive" \
7886
-configuration Release \
79-
-allowProvisioningUpdates \
80-
-authenticationKeyPath "$RUNNER_TEMP/AuthKey.p8" \
81-
-authenticationKeyID "$API_KEY_ID" \
82-
-authenticationKeyIssuerID "$API_ISSUER_ID" \
83-
DEVELOPMENT_TEAM="$TEAM_ID"
87+
CODE_SIGN_STYLE=Manual \
88+
DEVELOPMENT_TEAM="$TEAM_ID" \
89+
CODE_SIGN_IDENTITY="$SIGNING_IDENTITY" \
90+
PROVISIONING_PROFILE_SPECIFIER=""
8491
8592
- name: Export archive
8693
env:
8794
TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
8895
SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
89-
API_KEY_ID: ${{ secrets.API_KEY_ID }}
90-
API_ISSUER_ID: ${{ secrets.API_ISSUER_ID }}
9196
run: |
9297
EXPORT_PLIST="$RUNNER_TEMP/export-options.plist"
93-
cp scripts/export-options.plist "$EXPORT_PLIST"
98+
cat > "$EXPORT_PLIST" << 'EOF'
99+
<?xml version="1.0" encoding="UTF-8"?>
100+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
101+
<plist version="1.0">
102+
<dict>
103+
<key>method</key>
104+
<string>developer-id</string>
105+
<key>signingStyle</key>
106+
<string>manual</string>
107+
</dict>
108+
</plist>
109+
EOF
110+
94111
/usr/libexec/PlistBuddy -c "Add :teamID string $TEAM_ID" "$EXPORT_PLIST"
95-
/usr/libexec/PlistBuddy -c "Set :signingStyle automatic" "$EXPORT_PLIST"
96112
/usr/libexec/PlistBuddy -c "Add :signingCertificate string $SIGNING_IDENTITY" "$EXPORT_PLIST"
113+
/usr/libexec/PlistBuddy -c "Add :provisioningProfiles dict" "$EXPORT_PLIST"
114+
/usr/libexec/PlistBuddy -c "Add :provisioningProfiles:com.cloudmount.app string CloudMount Developer ID" "$EXPORT_PLIST"
115+
/usr/libexec/PlistBuddy -c "Add :provisioningProfiles:com.cloudmount.app.extension string CloudMount Extension Developer ID" "$EXPORT_PLIST"
97116
98117
xcodebuild -exportArchive \
99118
-archivePath "$RUNNER_TEMP/CloudMount.xcarchive" \
100119
-exportPath "$RUNNER_TEMP/export" \
101-
-exportOptionsPlist "$EXPORT_PLIST" \
102-
-allowProvisioningUpdates \
103-
-authenticationKeyPath "$RUNNER_TEMP/AuthKey.p8" \
104-
-authenticationKeyID "$API_KEY_ID" \
105-
-authenticationKeyIssuerID "$API_ISSUER_ID"
120+
-exportOptionsPlist "$EXPORT_PLIST"
106121
107122
- name: Verify code signature
108123
run: |
@@ -158,6 +173,7 @@ jobs:
158173
run: |
159174
security delete-keychain "$RUNNER_TEMP/app-signing.keychain-db" 2>/dev/null || true
160175
rm -f "$RUNNER_TEMP/AuthKey.p8" "$RUNNER_TEMP/build_certificate.p12"
176+
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles
161177
162178
publish:
163179
needs: build-sign-notarize

0 commit comments

Comments
 (0)