Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ jobs:
npm ci
npm run dist

- name: Notarize and staple the DMG
- name: Sign, notarize and staple the DMG
working-directory: desktop-app/release
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
run: |
set -euo pipefail
DMG="Darkbloom-$VERSION-arm64.dmg"
# electron-builder leaves the DMG unsigned; Gatekeeper wants the container
# signed by the same Developer ID before it's notarized.
codesign --sign "$CSC_NAME" --keychain "$KEYCHAIN_PATH" --timestamp "$DMG"
xcrun notarytool submit "$DMG" --apple-id "$APPLE_ID" --password "$APPLE_APP_PASSWORD" \
--team-id "$APPLE_TEAM_ID" --wait --output-format json > "$RUNNER_TEMP/notary.json"
status=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["status"])' "$RUNNER_TEMP/notary.json")
Expand Down Expand Up @@ -166,7 +169,11 @@ jobs:
grep -q "source=Notarized Developer ID" "$RUNNER_TEMP/spctl.txt"
xcrun stapler validate "$APP"
xcrun stapler validate "$DMG"
spctl --assess --type open --context context:primary-signature --verbose=2 "$DMG"
codesign --verify --verbose=2 "$DMG"
team=$(codesign -dv "$DMG" 2>&1 | sed -n 's/^TeamIdentifier=//p')
[ "$team" = "$APPLE_TEAM_ID" ] || { echo "::error::DMG signed by team $team, expected $APPLE_TEAM_ID"; exit 1; }
spctl --assess --type open --context context:primary-signature --verbose=2 "$DMG" 2>&1 | tee "$RUNNER_TEMP/spctl-dmg.txt"
grep -q "source=Notarized Developer ID" "$RUNNER_TEMP/spctl-dmg.txt"
hdiutil verify "$DMG"
bash -n "$APP/Contents/Resources/bootstrap/install-runtime.sh"
shasum -a 256 "$DMG" "$ZIP" > SHA256SUMS
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/desktop-release-sign-dmg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Desktop release signs the DMG

The desktop release workflow now signs the DMG with the Eigen Labs Developer ID
before notarizing it. The first dry run built, signed and notarized the app, but
Gatekeeper rejected the unsigned DMG (`source=no usable signature`).
5 changes: 3 additions & 2 deletions docs/operations/desktop-release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release The macOS Desktop App

> Last updated: 2026-10-23
> Last updated: 2026-10-26

Build, sign, notarize and publish the Darkbloom desktop app (`desktop-app/`) as a
GitHub Release. The workflow is `.github/workflows/release-desktop.yml`. It signs
Expand Down Expand Up @@ -54,7 +54,8 @@ Before anything is published:
name) with the hardened runtime, has bundle ID `io.darkbloom.desktop` and the
package version, and is notarized and stapled. `spctl` reports
`Notarized Developer ID`.
- The DMG is notarized, stapled and passes `hdiutil verify`.
- The DMG is signed by the same team, notarized and stapled, `spctl` reports
`Notarized Developer ID` for it, and it passes `hdiutil verify`.
- The bundled CLI installer (`Contents/Resources/bootstrap/install-runtime.sh`)
is present and parses.

Expand Down
Loading