Skip to content

Commit 724715b

Browse files
katipallyCopilot
andcommitted
fix(release): extract .app from archive directly, skip -exportArchive
exportArchive with signingStyle=automatic requires cloud signing admin role to download a Developer ID profile — our API key (App Manager) does not have that permission. The archive .app is already built; extract it directly from Products/Applications/ and let the manual re-sign step apply the Developer ID certificate. Also use Release.entitlements for production re-sign (aps-environment=production). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4daf1c5 commit 724715b

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,28 @@ jobs:
137137
MARKETING_VERSION="${{ env.VERSION }}" \
138138
CURRENT_PROJECT_VERSION="${{ env.BUILD }}"
139139
140-
- name: Export Archive (Developer ID)
140+
- name: Extract app from archive
141141
run: |
142-
xcodebuild \
143-
-exportArchive \
144-
-archivePath build/DoomCoder.xcarchive \
145-
-exportPath build/export \
146-
-exportOptionsPlist scripts/ExportOptions.plist \
147-
-allowProvisioningUpdates \
148-
-authenticationKeyPath "${{ steps.write-asc-key.outputs.key_path }}" \
149-
-authenticationKeyID "${{ steps.write-asc-key.outputs.key_id }}" \
150-
-authenticationKeyIssuerID "${{ steps.write-asc-key.outputs.issuer_id }}"
142+
# Skip xcodebuild -exportArchive — it requires downloading a
143+
# Developer ID provisioning profile via cloud signing (needs Admin
144+
# role). The archive already contains the built .app; we extract it
145+
# directly and the re-sign step will apply the correct Developer ID.
146+
mkdir -p build/export
147+
APP_IN_ARCHIVE="build/DoomCoder.xcarchive/Products/Applications/DoomCoder.app"
148+
if [ ! -d "$APP_IN_ARCHIVE" ]; then
149+
echo "::error::App not found in archive at $APP_IN_ARCHIVE"
150+
ls -laR build/DoomCoder.xcarchive/Products/ || true
151+
exit 1
152+
fi
153+
cp -R "$APP_IN_ARCHIVE" build/export/DoomCoder.app
154+
echo "✅ Extracted DoomCoder.app from archive"
155+
echo " Size: $(du -sh build/export/DoomCoder.app | cut -f1)"
151156
152157
- name: Re-sign all embedded code (inside-out)
153158
run: |
154159
APP="build/export/DoomCoder.app"
155160
IDENTITY="Developer ID Application"
156-
ENTS="DoomCoder/DoomCoder.entitlements"
161+
ENTS="DoomCoder/DoomCoder.Release.entitlements"
157162
158163
# Fail loudly if the app wasn't exported where we expect
159164
if [ ! -d "$APP" ]; then

0 commit comments

Comments
 (0)