Skip to content

Commit f3fced1

Browse files
katipallyCopilot
andcommitted
fix(release): embed Developer ID provisioning profile in app bundle
The archive's Automatic signing embeds a Mac Development profile whose cert list does NOT include the Developer ID Application certificate. After we re-sign with Developer ID, the embedded profile's cert list no longer matches the signing identity → Gatekeeper rejects the launch with 'application can't be opened'. Fix: install MAC_PROVISIONING_PROFILE secret (manually created Developer ID profile for com.doomcoder.app) and replace embedded.provisionprofile before the re-sign pass. This makes the embedded profile, signing cert, and entitlements all consistent for Gatekeeper validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1553baf commit f3fced1

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,25 @@ jobs:
7878
7979
security find-identity -v -p codesigning build.keychain
8080
81+
- name: Install Mac Developer ID provisioning profile
82+
env:
83+
MAC_PROFILE: ${{ secrets.MAC_PROVISIONING_PROFILE }}
84+
run: |
85+
if [ -z "${MAC_PROFILE:-}" ]; then
86+
echo "::error::MAC_PROVISIONING_PROFILE secret is empty"
87+
exit 1
88+
fi
89+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
90+
PROFILE_PATH="$HOME/Library/MobileDevice/Provisioning Profiles/DoomCoder_Mac_DevID.provisionprofile"
91+
printf '%s' "$MAC_PROFILE" | base64 -D > "$PROFILE_PATH"
92+
# Save the path so later steps can embed it
93+
echo "MAC_PROFILE_PATH=$PROFILE_PATH" >> "$GITHUB_ENV"
94+
# Validate it parses + show its name
95+
echo "Installed profile:"
96+
security cms -D -i "$PROFILE_PATH" | plutil -extract Name xml1 -o - - | grep '<string>'
97+
echo "Profile platform:"
98+
security cms -D -i "$PROFILE_PATH" | plutil -extract Platform xml1 -o - - | grep '<string>'
99+
81100
- name: Resolve Swift Packages
82101
run: |
83102
xcodebuild -resolvePackageDependencies \
@@ -154,6 +173,17 @@ jobs:
154173
echo "✅ Extracted DoomCoder.app from archive"
155174
echo " Size: $(du -sh build/export/DoomCoder.app | cut -f1)"
156175
176+
- name: Embed Developer ID provisioning profile
177+
run: |
178+
APP="build/export/DoomCoder.app"
179+
# Replace the auto-generated Mac Development profile (from the
180+
# archive's Automatic signing) with our Developer ID profile.
181+
# Gatekeeper verifies signing identity is listed in this profile.
182+
cp "${MAC_PROFILE_PATH}" "${APP}/Contents/embedded.provisionprofile"
183+
echo "✅ Embedded Developer ID profile"
184+
security cms -D -i "${APP}/Contents/embedded.provisionprofile" \
185+
| plutil -extract Name xml1 -o - - | grep '<string>'
186+
157187
- name: Re-sign all embedded code (inside-out)
158188
run: |
159189
APP="build/export/DoomCoder.app"

0 commit comments

Comments
 (0)