chore: migrate release to reusable macos-sparkle-release workflow - #3
Open
adamXbot wants to merge 2 commits into
Open
chore: migrate release to reusable macos-sparkle-release workflow#3adamXbot wants to merge 2 commits into
adamXbot wants to merge 2 commits into
Conversation
Replace the copy-pasted gen-1 release pipeline with a thin caller of privacykey/gh-workflows/.github/workflows/macos-sparkle-release.yml@v1, switch ci.yml to the shared macos-app-ci.yml@v1 caller (which was generalised from this repo's CI, so behaviour is unchanged), update Scripts/release.sh to the shared release-script env contract (APPLE_SIGNING_IDENTITY / ASC API key notarization / KEYCHAIN_PATH / dSYM staging), and move the Homebrew cask to packaging/homebrew/bananablitz.rb as a @@Version@@/@@sha256@@/@@url@@ template so the pipeline can publish it to adamxbot/homebrew-tap automatically. 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 BananaBlitz from its copy-pasted gen-1 release pipeline to the shared reusable workflows in
privacykey/gh-workflows(pinned@v1).What changed
.github/workflows/release.yml— replaced the 119-line gen-1 pipeline with a thin caller ofmacos-sparkle-release.yml@v1(xcodeproj: BananaBlitz.xcodeproj,scheme: BananaBlitz,uses_xcodegen: true,release_script: ./Scripts/release.sh,cask_name: bananablitz,tap_repo: adamxbot/homebrew-tap). Secrets are mapped explicitly under the gen-3 names. Caller keepspermissions: contents: write(a called workflow can only reduce the caller's token) and duplicatesconcurrencyper the shared repo's README..github/workflows/ci.yml— swapped to themacos-app-ci.yml@v1caller. This is a clean swap: the reusable CI workflow was generalised from this repo's ci.yml. Only deliberate drops:xcprettydecoration and theshowdestinations-on-failure fallback (the uploaded xcresult bundle carries all of it).Scripts/release.sh— updated to the shared release-script env contract: notarization now uses the ASC API key (xcrun notarytool … --key/--key-id/--issuerfromAPPLE_API_KEY_PATH/APPLE_API_KEY_ID/APPLE_API_ISSUER) instead of Apple-ID + app-specific password; signing identity comes fromAPPLE_SIGNING_IDENTITY(falls back to probing the keychain locally;DEVELOPER_IDstill works as an alias); the directcodesigncall honoursKEYCHAIN_PATHwhen set; the dSYM is staged tosymbols/BananaBlitz-<version>.app.dSYM.zip; the notarization zip is removed fromdist/after stapling so the workflow's built-ingenerate_appcast(which scans all ofdist/) can't pick up a duplicate archive. Still runs locally for dry-runs.Casks/bananablitz.rb→packaging/homebrew/bananablitz.rb— converted to the@@VERSION@@/@@SHA256@@/@@URL@@template the reusable cask step renders and pushes toadamxbot/homebrew-tapautomatically, replacing the manual copy-on-every-release chore. The cask step skips cleanly until a tap token is configured.Scripts/generate-appcast.shis now unused by CI (the built-in appcast step replaces it, same key-format validation). Kept for local use; can be deleted later.Secrets required before the next
v*tagThe workflow reads these — see the gh-workflows README for what each is and how to mint it:
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). Verify withgh secret listbefore tagging.Two traps worth knowing:
SPARKLE_PRIVATE_KEYis the base64 output ofgenerate_keys -xas-is — do not base64 it again (docs/RELEASES.md'sbase64 < sparkle-private.pemstep would double-encode; the workflow validates and rejects that).APPLE_DEVELOPER_ID_*,APPLE_NOTARY_*) are not referenced anywhere after this PR — don't recreate them.Recommended follow-up (not required for the first release): create a
macos-signingenvironment with a required-reviewers rule, keepSPARKLE_PRIVATE_KEYin it, and switch the caller from explicitsecrets:mapping tosecrets: inherit— environment secrets resolve empty under explicit mapping.Past releases were cut locally via
Scripts/release.sh, so the firstv*tag after merge exercises keychain import, ASC-key notarization, appcast generation, Release publish, and appcast push end-to-end, live.workflow_dispatchis not wired (kept the caller minimal). Recommend a prerelease tag first, e.g.v1.0.1-rc.1. Note the tag-verify step requires the tag to exactly matchMARKETING_VERSION, so setMARKETING_VERSION: "1.0.1-rc.1"inproject.ymlfor the rc, then bump to the real version. Caveat: an rc run still publishes a real GitHub prerelease and overwritesgh-pages/appcast.xml(Sparkle clients would see the rc) — delete the rc Release and revert the appcast commit afterwards, or dry-run on a fork.project.ymlcurrently hasMARKETING_VERSION: "1.0.0"while the latest tag isv0.0.3— the next real tag must bev1.0.0(or bump the setting to match whatever you tag).testjob runs with no secrets before anything signing-related, so a broken build fails safely.Rollback
git revertof this PR's merge commit restores the previous self-contained release.yml/ci.yml, the oldScripts/release.sh(Apple-ID notarization), andCasks/bananablitz.rb— no state outside the repo to undo.Also worth a follow-up:
docs/RELEASES.mdand the README still describe the old flow and gen-1 secret names.🤖 Generated with Claude Code