|
@@ -2,14 +2,22 @@
|
|
|
|
|
|
|
|
OliveTin signs release binaries on two platforms:
|
|
OliveTin signs release binaries on two platforms:
|
|
|
|
|
|
|
|
-* **macOS** — Developer ID + notarization via [quill](https://github.com/anchore/quill) inside GoReleaser (optional only when `MACOS_SIGN_P12` is unset).
|
|
|
|
|
|
|
+* **macOS** — Developer ID + notarization via [quill](https://github.com/anchore/quill) in a separate GitHub Actions job (signed darwin tarballs are uploaded after the release is published).
|
|
|
* **Windows** — Authenticode via [SignPath Foundation](https://signpath.org/) in a separate GitHub Actions job (signed zip/MSI are uploaded after the release is published).
|
|
* **Windows** — Authenticode via [SignPath Foundation](https://signpath.org/) in a separate GitHub Actions job (signed zip/MSI are uploaded after the release is published).
|
|
|
|
|
|
|
|
## macOS release signing
|
|
## macOS release signing
|
|
|
|
|
|
|
|
-Release builds can sign and notarize the `darwin` binaries using [quill](https://github.com/anchore/quill) via GoReleaser. This runs on the existing Linux CI runner; no macOS runner or Xcode is required.
|
|
|
|
|
|
|
+Release builds sign and notarize the `darwin` binaries using [quill](https://github.com/anchore/quill). This runs on a Linux CI runner; no macOS runner or Xcode is required.
|
|
|
|
|
|
|
|
-Signing is **optional** only when `MACOS_SIGN_P12` is unset — GoReleaser then skips macOS signing and publishes unsigned binaries. When `MACOS_SIGN_P12` is set, the companion macOS secrets below are required or the release fails.
|
|
|
|
|
|
|
+Like Windows signing, this happens **after** the release is published, so a problem on Apple's side cannot block a release:
|
|
|
|
|
+
|
|
|
|
|
+1. GoReleaser builds `OliveTin-darwin-{amd64,arm64}.tar.gz` unsigned and leaves them out of the GitHub release and `checksums.txt`. The `build` job uploads them as the `unsigned-darwin` workflow artifact.
|
|
|
|
|
+2. The `sign-macos` job checks the `.p12` chain, then signs and notarizes each binary with quill, repacks the tarballs and checks the designated requirement.
|
|
|
|
|
+3. The job uploads the signed tarballs to the release and adds their lines to `checksums.txt`.
|
|
|
|
|
+
|
|
|
|
|
+If `sign-macos` fails (for example an expired Apple agreement, a notary outage or a certificate problem), the release stays published without macOS assets. Fix the cause, then use **Re-run failed jobs** on that workflow run. The unsigned artifact must still be within its retention period.
|
|
|
|
|
+
|
|
|
|
|
+`sign-windows` and `sign-macos` share a concurrency group, so they never update `checksums.txt` at the same time.
|
|
|
|
|
|
|
|
### Prerequisites
|
|
### Prerequisites
|
|
|
|
|
|
|
@@ -99,7 +107,7 @@ In **Settings → Secrets and variables → Actions**, create:
|
|
|
| `MACOS_NOTARY_KEY_ID` | Key ID from App Store Connect (e.g. `ABC123DEF4`) |
|
|
| `MACOS_NOTARY_KEY_ID` | Key ID from App Store Connect (e.g. `ABC123DEF4`) |
|
|
|
| `MACOS_NOTARY_ISSUER_ID` | Issuer UUID from App Store Connect |
|
|
| `MACOS_NOTARY_ISSUER_ID` | Issuer UUID from App Store Connect |
|
|
|
|
|
|
|
|
-All five must be present for signing to run. GoReleaser enables the step when `MACOS_SIGN_P12` is set; missing companion secrets will fail that release.
|
|
|
|
|
|
|
+All five must be present; `sign-macos` fails (without affecting the published release) if any are missing.
|
|
|
|
|
|
|
|
### Renewal
|
|
### Renewal
|
|
|
|
|
|
|
@@ -108,6 +116,7 @@ All five must be present for signing to run. GoReleaser enables the step when `M
|
|
|
| Developer ID Application certificate | ~5 years | Create a new certificate in the Apple portal, export a new **full-chain** `.p12` (leaf + G2 intermediate + Apple Root CA), update `MACOS_SIGN_P12` and `MACOS_SIGN_PASSWORD`. |
|
|
| Developer ID Application certificate | ~5 years | Create a new certificate in the Apple portal, export a new **full-chain** `.p12` (leaf + G2 intermediate + Apple Root CA), update `MACOS_SIGN_P12` and `MACOS_SIGN_PASSWORD`. |
|
|
|
| App Store Connect API key | Does not expire, but can be revoked | Create a new key if compromised or lost; update `MACOS_NOTARY_KEY`, `MACOS_NOTARY_KEY_ID`, and optionally `MACOS_NOTARY_ISSUER_ID`. |
|
|
| App Store Connect API key | Does not expire, but can be revoked | Create a new key if compromised or lost; update `MACOS_NOTARY_KEY`, `MACOS_NOTARY_KEY_ID`, and optionally `MACOS_NOTARY_ISSUER_ID`. |
|
|
|
| Apple Developer Program | Annual subscription | Renew membership before it lapses; existing certificates stop working if the account is inactive. |
|
|
| Apple Developer Program | Annual subscription | Renew membership before it lapses; existing certificates stop working if the account is inactive. |
|
|
|
|
|
+| Apple Developer agreements | Re-issued by Apple from time to time | When Apple publishes an updated Program License Agreement, the Account Holder must accept it at https://developer.apple.com/account. Until then notarization fails with `403 FORBIDDEN.REQUIRED_AGREEMENTS_MISSING_OR_EXPIRED`. |
|
|
|
|
|
|
|
|
After updating secrets, the next release on `main` (via semantic-release) will use the new credentials automatically.
|
|
After updating secrets, the next release on `main` (via semantic-release) will use the new credentials automatically.
|
|
|
|
|
|
|
@@ -116,7 +125,7 @@ After updating secrets, the next release on `main` (via semantic-release) will u
|
|
|
From any platform (no Mac required), check that quill did **not** emit the broken `certificate root[...]` designated requirement:
|
|
From any platform (no Mac required), check that quill did **not** emit the broken `certificate root[...]` designated requirement:
|
|
|
|
|
|
|
|
```sh
|
|
```sh
|
|
|
-go install github.com/anchore/quill/cmd/quill@latest
|
|
|
|
|
|
|
+go install github.com/anchore/quill/cmd/quill@v0.7.1
|
|
|
quill describe OliveTin-darwin-arm64/OliveTin
|
|
quill describe OliveTin-darwin-arm64/OliveTin
|
|
|
```
|
|
```
|
|
|
|
|
|
|
@@ -134,11 +143,11 @@ spctl -a -vv -t execute OliveTin-darwin-arm64/OliveTin
|
|
|
|
|
|
|
|
### Configuration reference
|
|
### Configuration reference
|
|
|
|
|
|
|
|
-- GoReleaser: `notarize.macos` in link:https://github.com/OliveTin/OliveTin/blob/main/.goreleaser.yml[`.goreleaser.yml`]
|
|
|
|
|
-- CI secrets: link:https://github.com/OliveTin/OliveTin/blob/main/.github/workflows/build-and-release.yml[`.github/workflows/build-and-release.yml`] (`release` step)
|
|
|
|
|
|
|
+- GoReleaser: the `darwin` build and archive in link:https://github.com/OliveTin/OliveTin/blob/main/.goreleaser.yml[`.goreleaser.yml`]
|
|
|
|
|
+- CI job and secrets: link:https://github.com/OliveTin/OliveTin/blob/main/.github/workflows/build-and-release.yml[`.github/workflows/build-and-release.yml`] (`sign-macos` job)
|
|
|
|
|
+- Sign, notarize and upload: link:https://github.com/OliveTin/OliveTin/blob/main/var/macos/sign-and-publish.sh[`var/macos/sign-and-publish.sh`]
|
|
|
- CI preflight (3-cert P12): link:https://github.com/OliveTin/OliveTin/blob/main/var/macos/verify-macos-sign-p12.sh[`var/macos/verify-macos-sign-p12.sh`]
|
|
- CI preflight (3-cert P12): link:https://github.com/OliveTin/OliveTin/blob/main/var/macos/verify-macos-sign-p12.sh[`var/macos/verify-macos-sign-p12.sh`]
|
|
|
- CI post-sign check (designated requirement): link:https://github.com/OliveTin/OliveTin/blob/main/var/macos/verify-signed-darwin.sh[`var/macos/verify-signed-darwin.sh`]
|
|
- CI post-sign check (designated requirement): link:https://github.com/OliveTin/OliveTin/blob/main/var/macos/verify-signed-darwin.sh[`var/macos/verify-signed-darwin.sh`]
|
|
|
-- link:https://goreleaser.com/customization/notarize/[GoReleaser notarization docs]
|
|
|
|
|
|
|
|
|
|
## Windows release signing (SignPath)
|
|
## Windows release signing (SignPath)
|
|
|
|
|
|