Skip to content

desktop: signed + notarized releases (mac arm64+intel, win, linux)#36

Merged
julia-kafarska merged 2 commits into
mainfrom
desktop/signed-notarized-release
Jun 20, 2026
Merged

desktop: signed + notarized releases (mac arm64+intel, win, linux)#36
julia-kafarska merged 2 commits into
mainfrom
desktop/signed-notarized-release

Conversation

@julia-kafarska

@julia-kafarska julia-kafarska commented Jun 20, 2026

Copy link
Copy Markdown
Member

Makes pnpm release <version> produce signed + notarized macOS (Apple Silicon + Intel), Windows x64, and Linux x64 builds — and refreshes the app icon + DMG branding. Previously the pipeline shipped unsigned, arm64-only Mac.

What changed

  • macOS signing (CI): Developer ID identity, hardenedRuntime: true, explicit entitlements/entitlementsInherit (incl. disable-library-validation for better-sqlite3). Secrets gated to the macOS runners.
  • Notarization (Pattern C): new scripts/notarize-release.mjs (submit → staple → re-upload), run by release.mjs while the release is still a draft — before un-drafting — so it never blocks CI on Apple's notary queue and "Immutable releases" can't freeze unnotarized DMGs.
  • Mac Intel: release matrix builds arm64 on macos-latest and x64 on macos-15-intel (native runners), so better-sqlite3 + the Prisma engine compile per-arch. Removed pinned arch from the config so --arm64/--x64 each build exactly one slice (the old single-runner cross-build shipped a broken Intel slice).
  • Linux: dropped the arm64 target (would fail the x64-only ubuntu-latest runner and drop all Linux artifacts).
  • Icon: reprocessed from the brand logo → macOS squircle, full PNG set + .icns + .ico.
  • DMG: branded background + drag-to-Applications layout; NSIS installerIcon/uninstallerIcon.
  • Fixes: moved entitlements.mac.plist out of the gitignored build/ dir into tracked resources/, and tracked dmg-background.png (gitignored by *.png) — both were missing from the repo and would break signing/packaging in a fresh CI checkout.

Verified locally (real signed builds)

  • codesign -dvvv: Developer ID Application: Julia Kafarska (8Y2UTZ2NBZ), flags=0x10000(runtime), entitlements embedded.
  • --arm64 builds arm64 only (no broken cross-build).
  • Mounted DMG: branded background + Applications symlink + new app/volume icon.

Deferred (follow-up)

Auto-update serves one mac arch's latest-mac.yml channel (the two runners overwrite each other). Auto-update was inert while unsigned; a merged manifest is a clean follow-up.

Wire macOS Developer ID signing in CI (hardened runtime + explicit
entitlements) and local notarization (Pattern C, scripts/notarize-release.mjs)
run while the GitHub release is still a draft, so the build never blocks on
Apple's notary queue and "Immutable releases" doesn't freeze unnotarized DMGs.

Build macOS on native runners — arm64 on macos-latest, Intel x64 on
macos-15-intel — so better-sqlite3 and the Prisma engine compile natively per
arch (the previous single-runner cross-build shipped a broken Intel slice).
Stop pinning arch in the config so --arm64/--x64 each build one slice. Gate the
signing secrets to the macOS runners. Drop the Linux arm64 target (it would fail
the x64-only runner and drop all Linux artifacts).

Reprocess the app icon from the brand logo (macOS squircle -> full PNG set +
.icns + .ico) and add a branded DMG (background + drag-to-Applications) plus
NSIS installer icons.

Move entitlements out of the gitignored build/ dir into resources/ and track
dmg-background.png so the signing/packaging assets actually exist in CI.

Restore release.mjs Stage D (notarize) before the un-draft. Update desktop.md.
packages/ui/src/assets.d.ts (declare module '*.svg' + the import.meta.env
type) and packages/web/src/vite-env.d.ts are hand-written ambient shims, but
.gitignore's packages/{ui,web}/src/**/*.d.ts rule excluded them. A fresh CI
checkout therefore lacked them, producing 178 TS2307/TS2339 errors during
typecheck (missing *.svg module decls + import.meta.env). Whitelist both back,
mirroring the existing !apps/desktop/src/ambient.d.ts exception.
@julia-kafarska julia-kafarska merged commit 5097011 into main Jun 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant