KillSwitch is packaged from GitHub Actions and intended to ship as a GitHub Release plus a Homebrew cask.
.github/workflows/ci.yml performs a basic macOS build using swift build.
.github/workflows/release.yml:
- Builds a release binary with the full Xcode toolchain
- Stages
KillSwitch.app - Optionally signs the app when a Developer ID certificate is available
- Optionally notarizes and staples the app when Apple credentials are available
- Packages the bundle as both
KillSwitch.zipandKillSwitch.dmg - Generates a Sparkle
appcast.xmlusing the actual zip artifact and update signature - Generates
killswitch.rbusing the actual zip checksum - Uploads all release artifacts to the GitHub Release
- Publishes the latest
appcast.xmlback to the repository for in-app update checks
These are needed for signed releases:
APPLE_DEVELOPER_ID_CERTIFICATE_P12APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORDAPPLE_DEVELOPER_ID_IDENTITY
For notarization, configure one of these credential sets:
App Store Connect API key:
APPLE_API_KEY_P8APPLE_API_KEY_IDAPPLE_API_ISSUER_ID
Apple ID with app-specific password:
APPLE_IDAPPLE_TEAM_IDAPPLE_APP_SPECIFIC_PASSWORD
If those secrets are absent, the workflow still produces an unsigned artifact for preview/testing.
For Sparkle appcast signing in CI, configure:
SPARKLE_PRIVATE_ED_KEY
This is the exported private EdDSA key for the public SUPublicEDKey embedded in the app bundle.
The private key must never be committed to the repository.
If you want the release workflow to publish the generated cask into a tap automatically, configure:
HOMEBREW_TAP_REPOSITORYExample:your-org/homebrew-toolsHOMEBREW_TAP_GITHUB_TOKENA token with write access to that tap repository
Optional GitHub Actions variable:
HOMEBREW_TAP_CASK_PATHDefaults toCasks/killswitch.rb
The workflow generates a ready-to-publish cask file that points at:
https://github.com/<owner>/<repo>/releases/download/v<version>/KillSwitch.zip
Recommended flow:
- Create a tap repository such as
homebrew-toolsorhomebrew-killswitch - Add the tap secrets above if you want GitHub Actions to update the tap automatically
- Push a release tag such as
v0.1.0 - Let the workflow publish
KillSwitch.zip,KillSwitch.dmg, andkillswitch.rb - Let the workflow publish
appcast.xmlback to the repository for Sparkle clients - If tap automation is configured, the workflow commits the cask into the tap for you
- Install with
brew install --cask <tap>/killswitch
If tap automation is not configured, the workflow still uploads killswitch.rb as a release asset so you can copy it into the tap manually.
You can package locally with:
./script/package_release.sh 0.1.0If you want signing or notarization locally, export the same environment variables used in CI before running the script. Local packaging can sign the Sparkle appcast either with:
SPARKLE_PRIVATE_ED_KEYexported in your shell, or- a local Sparkle key stored in Keychain under account
com.killswitch.sparkle