|
| 1 | +# Release Signing |
| 2 | + |
| 3 | +Release builds use Apple Developer ID signing and notarization for macOS |
| 4 | +distribution outside the Mac App Store. |
| 5 | + |
| 6 | +## Published Artifacts |
| 7 | + |
| 8 | +The release workflow keeps the existing tarballs and also publishes directly |
| 9 | +installable packages: |
| 10 | + |
| 11 | +- `computer-use-<version>-macos-arm64.pkg` |
| 12 | + - Installs `/usr/local/bin/computer-use`. |
| 13 | +- `computer-use-guest-kit-<version>-macos-arm64.pkg` |
| 14 | + - Installs `/Applications/ComputerUseAgent.app`. |
| 15 | + - Installs `/usr/local/libexec/computer-use/bootstrap-agent`. |
| 16 | + - Installs the LaunchDaemon and LaunchAgent plists. |
| 17 | + - Runs a `postinstall` script that fixes ownership, validates plists, and |
| 18 | + loads launchd jobs when possible. |
| 19 | + |
| 20 | +The app bundle id is: |
| 21 | + |
| 22 | +- `com.jianliang00.computer-use-cli` |
| 23 | + |
| 24 | +The launchd labels remain: |
| 25 | + |
| 26 | +- `io.github.jianliang00.computer-use.bootstrap` |
| 27 | +- `io.github.jianliang00.computer-use.agent` |
| 28 | + |
| 29 | +## Apple Developer Setup |
| 30 | + |
| 31 | +Create these assets in the Apple developer account used for this project: |
| 32 | + |
| 33 | +1. Register the bundle id `com.jianliang00.computer-use-cli`. |
| 34 | +2. Create a `Developer ID Application` certificate and export it as a `.p12`. |
| 35 | +3. Create a `Developer ID Installer` certificate and export it as a `.p12`. |
| 36 | +4. Create an App Store Connect API key for notarization and download the `.p8` |
| 37 | + private key. |
| 38 | + |
| 39 | +The `.p12` exports must include the private key. Keep the certificate passwords |
| 40 | +and `.p8` private key out of the repository. |
| 41 | + |
| 42 | +## GitHub Actions Secrets |
| 43 | + |
| 44 | +Configure these repository secrets: |
| 45 | + |
| 46 | +- `APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64` |
| 47 | +- `APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD` |
| 48 | +- `APPLE_DEVELOPER_ID_APPLICATION_IDENTITY` |
| 49 | +- `APPLE_DEVELOPER_ID_INSTALLER_CERTIFICATE_BASE64` |
| 50 | +- `APPLE_DEVELOPER_ID_INSTALLER_CERTIFICATE_PASSWORD` |
| 51 | +- `APPLE_DEVELOPER_ID_INSTALLER_IDENTITY` |
| 52 | +- `APP_STORE_CONNECT_API_KEY_BASE64` |
| 53 | +- `APP_STORE_CONNECT_API_KEY_ID` |
| 54 | +- `APP_STORE_CONNECT_API_ISSUER_ID` |
| 55 | + |
| 56 | +The identity secrets should be the certificate common names, for example: |
| 57 | + |
| 58 | +- `Developer ID Application: Example Name (TEAMID)` |
| 59 | +- `Developer ID Installer: Example Name (TEAMID)` |
| 60 | + |
| 61 | +Base64 encode local files before pasting them into GitHub secrets: |
| 62 | + |
| 63 | +```bash |
| 64 | +base64 < DeveloperIDApplication.p12 | tr -d '\n' | pbcopy |
| 65 | +base64 < DeveloperIDInstaller.p12 | tr -d '\n' | pbcopy |
| 66 | +base64 < AuthKey_XXXXXXXXXX.p8 | tr -d '\n' | pbcopy |
| 67 | +``` |
| 68 | + |
| 69 | +## Workflow Behavior |
| 70 | + |
| 71 | +`.github/workflows/release.yml` imports the certificates into a temporary |
| 72 | +keychain, builds release artifacts with signing enabled, notarizes the app and |
| 73 | +packages, staples the app and packages, publishes the GitHub release, then |
| 74 | +deletes the temporary keychain. |
| 75 | + |
| 76 | +The packaging script signs these Mach-O artifacts before packaging: |
| 77 | + |
| 78 | +- `computer-use` |
| 79 | +- `bootstrap-agent` |
| 80 | +- `ComputerUseAgent.app` |
| 81 | + |
| 82 | +The `.pkg` artifacts are signed with the Developer ID Installer certificate, |
| 83 | +submitted to Apple's notary service, stapled, and validated with `spctl`. |
0 commit comments