chore: migrate release to reusable macos-sparkle-release workflow - #16
Merged
Conversation
Replace the 270-line copy-pasted release pipeline with a thin caller of privacykey/gh-workflows/.github/workflows/macos-sparkle-release.yml@v1 (secrets: inherit — required for the macos-signing environment scope). - publish_dsym: true preserves this repo's public-dSYM behaviour - cask_name/tap_repo + packaging/homebrew/privacycommand.rb template automate the previously-manual cask bump in privacykey/homebrew-tap (skips cleanly until HOMEBREW_TAP_TOKEN exists) - scripts/release.sh now pins its direct DMG codesign call to KEYCHAIN_PATH when set (shared-workflow env contract), with a local fallback to the default keychain search list - app-ci.yml calls macos-app-ci.yml@v1 so the Xcode app target builds and tests on push/PR — previously it only compiled on release day (ci.yml keeps covering the SPM targets) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the release pipeline to the shared reusable workflow at
privacykey/gh-workflows@v1, replacing the 270-line copy-pastedrelease.ymlwith a ~40-line caller.What changed
.github/workflows/release.yml— now a thin caller ofmacos-sparkle-release.yml@v1withsecrets: inherit. Inherit is required, not stylistic: the reusable workflow's release job declaresenvironment: macos-signing, and environment-scoped secrets only resolve inside that job — an explicitsecrets:mapping resolves in this caller's context (no environment) and comes back empty.workflow_dispatchre-releases are preserved via therelease_taginput.publish_dsym: truekeeps this repo's historical behaviour of attaching the dSYM to the public Release (the shared default is private-only)..github/workflows/app-ci.yml(new) — callsmacos-app-ci.yml@v1on push/PR tomain. Note: the existingci.ymlcovers the SPM targets (Core, auditctlKit, auditctl, guest agent) and is deliberately kept. What it never covered: the Xcode app target (privacycommand.app+privacycommandTests) first compiled on release day. This PR is the first time the actual app builds and tests on every push/PR.packaging/homebrew/privacycommand.rb(new) — cask template with@@VERSION@@/@@SHA256@@/@@URL@@placeholders. The tap cask (privacykey/homebrew-tap/Casks/privacycommand.rb) has been bumped manually until now; withcask_name/tap_repowired, the shared workflow renders and pushes it automatically. The step skips cleanly until a tap token is configured.scripts/release.sh— smallest-diff alignment with the shared env contract: the directcodesignof the DMG now passes--keychain "$KEYCHAIN_PATH"when set (CI's ephemeral keychain), falling back to the default keychain search list locally. Everything else (APPLE_SIGNING_IDENTITY,APPLE_API_KEY_PATH/_ID/_ISSUER,SCHEME,dist/privacycommand-<version>.dmg,symbols/privacycommand-<version>.app.dSYM.zip) already matched.scripts/generate-appcast.sh— no longer invoked by CI (the shared workflow has a built-in appcast step with the same key-format validation and a pinned, checksummed Sparkle CLI instead of an unpinned tarball fetch). Kept for local use; can be deleted once the built-in path is proven.Also new for free from the shared pipeline: a secret-free
testjob (unit tests + unsigned Release build) runs before themacos-signinggate and before any signing secret is read; a.sha256sidecar is published next to the DMG; the tag↔MARKETING_VERSIONcheck is unchanged.Secrets required before the next
v*tagThe workflow reads:
APPLE_CERTIFICATE,APPLE_CERTIFICATE_PASSWORD,APPLE_SIGNING_IDENTITY,APPLE_API_KEY,APPLE_API_KEY_ID,APPLE_API_ISSUER,SPARKLE_PRIVATE_KEY, plus optionalHOMEBREW_TAP_TOKEN(fine-grained PAT scoped to the tap only; the cask step skips cleanly without it). See the gh-workflows README for details, and verify presence withgh secret listbefore tagging.Recommended hardening (compatible with this PR as-is thanks to
secrets: inherit): give themacos-signingenvironment a required-reviewers rule so releases pause for human approval before any secret is read (tests run before that gate), and keepSPARKLE_PRIVATE_KEYscoped to that environment (per-app key, never shared).Nothing in this PR runs the release pipeline — the first
v*tag push after merging exercises it end to end (signing, notarization, appcast, Release, cask). To de-risk:workflow_dispatch: the caller keeps the manual trigger — run the Release workflow from the Actions tab with an existing tag to exercise the pipeline against a known-good version. Note this is a real run (it will re-publish assets for that tag), so prefer:-rcprerelease: bumpMARKETING_VERSION, push e.g.v0.1.6-rc.1, and let the whole pipeline run on a throwaway version before the realv0.1.6. (The tag must matchMARKETING_VERSION— the verify step enforcesv1.2.3 ⇔ 1.2.3, so use a matching prerelease marketing version or expect the check to fail fast, which is itself a cheap smoke test of the plumbing.)testjob runs with zero secrets, so a broken build fails before anything is signed or published.Rollback
git revertof this PR's merge commit restores the previous self-containedrelease.yml,scripts/release.shbehaviour, and removes the caller — the old pipeline needed no secrets that have been removed, so a revert is immediately releasable. (app-ci.ymland the cask template are additive and harmless either way.)🤖 Generated with Claude Code