Skip to content

feat: embed app extensions in macOS app releases - #14

Merged
Keith Oak (keith-oak) merged 1 commit into
mainfrom
feat/macos-release-app-extensions
Sep 22, 2026
Merged

Keith Oak (keith-oak) merged 1 commit into
mainfrom
feat/macos-release-app-extensions

Conversation

@keith-oak

Copy link
Copy Markdown
Member

What

A new optional app-extensions input on macos-app-release.yml for shipping app extensions (for example, Sitrep's WidgetKit widget) inside the .app.

Each line is <executable> <info-plist> <entitlements>. For each extension, the workflow:

  • checks the Info.plist names the executable and declares NSExtension:NSExtensionPointIdentifier, and that the entitlements file exists, before building
  • builds it arm64-only, like the app
  • wraps it as Contents/PlugIns/<executable>.appex, stamped with the app's version and build number
  • signs it with its own entitlements before the app is signed over it, in both the Developer ID and ad-hoc paths

Signature verification is now --deep.

Binaries are located with swift build --show-bin-path instead of the hardcoded .build/arm64-apple-macosx/release path, which the Xcode 27 toolchain no longer uses.

Callers that don't set app-extensions get the same bundle as before.

Testing

  • actionlint passes.
  • The build, assemble, ad-hoc sign and verify steps were run locally against Sitrep in a simulated Actions environment, with three results:
    • with the widget: it is bundled, the build number stamped, sandbox entitlements applied, and --deep verify passes
    • with no extensions: the bundle is unchanged
    • with a malformed app-extensions line: the run fails early with a clear error
  • The Developer ID signing branch mirrors the ad-hoc logic but wasn't exercised, because no certificates are available locally.

The runbook (docs/releasing-macos-apps.md) documents the new input.

A new app-extensions input lists SwiftPM executables to ship as
Contents/PlugIns/<name>.appex (for example a WidgetKit widget). Each is
checked up front (Info.plist names the executable and declares an extension
point; entitlements exist), built arm64-only, stamped with the app's version
and build number, and signed with its own entitlements before the app is
signed over it, in both the Developer ID and ad-hoc paths. Verification is
now --deep so a badly signed extension fails the run.

Binaries are located with swift build --show-bin-path rather than a hardcoded
.build/arm64-apple-macosx path, which newer toolchains no longer use.

Callers that don't set app-extensions get the same bundle as before.
Copilot AI lite review requested due to automatic review settings September 22, 2026 12:06
@keith-oak
Keith Oak (keith-oak) enabled auto-merge (squash) September 22, 2026 12:07
@keith-oak
Keith Oak (keith-oak) merged commit c0e1c28 into main Sep 22, 2026
4 checks passed
@keith-oak
Keith Oak (keith-oak) deleted the feat/macos-release-app-extensions branch September 22, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved moderate issues affect extension stamping, resource packaging, and required linker flags.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds optional app-extension packaging, signing, and verification to the reusable macOS release workflow.

Changes:

  • Validates, builds, bundles, versions, signs, and verifies extensions.
  • Uses SwiftPM’s discovered binary path and deep signature verification.
  • Documents the new app-extensions input.
File Summary
.github/​workflows/​macos-app-release.yml Implements extension assembly and signing. Moderate findings: missing version keys can cause stamping to fail, and extension resources are not copied.
docs/​releasing-macos-apps.md Documents extension configuration. Moderate finding: documented linker flags are not applied or validated.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +233 to +234
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" "$appex/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD" "$appex/Contents/Info.plist"
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.

2 participants