Skip to content

[codex] Add Sparkle release updates#9

Merged
nickdirienzo merged 6 commits intomainfrom
codex/github-release-updates
Apr 28, 2026
Merged

[codex] Add Sparkle release updates#9
nickdirienzo merged 6 commits intomainfrom
codex/github-release-updates

Conversation

@rosslazer
Copy link
Copy Markdown
Contributor

Summary

Adds the plumbing to ship Flight as a signed, notarized macOS app that can update itself from GitHub Releases via Sparkle.

  • Adds Sparkle 2.9.1 and a guarded SwiftUI Check for Updates... menu item.
  • Updates build.sh to embed Sparkle, set release metadata, optionally sign, and emit a release zip.
  • Adds a Release GitHub Actions workflow that imports a Developer ID certificate, signs, notarizes, staples, generates a signed Sparkle appcast, and publishes release assets.
  • Documents the one-time Apple/Sparkle setup in doc/releasing.md.

Nick setup checklist

This PR is intentionally wired so the repo admin can add credentials after review. Required GitHub Actions secrets:

  • APPLE_DEVELOPER_ID_CERTIFICATE_BASE64
  • APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD
  • APPLE_ID
  • APPLE_APP_SPECIFIC_PASSWORD
  • APPLE_TEAM_ID
  • SPARKLE_PRIVATE_ED_KEY

Required repository variable:

  • SPARKLE_PUBLIC_ED_KEY

Optional repository variables:

  • FLIGHT_BUNDLE_ID if the Apple account uses a different bundle identifier than com.flight.app
  • SPARKLE_FEED_URL if we do not want to use the default https://github.com/mirage-security/flight/releases/latest/download/appcast.xml

Validation

  • swift build --target Flight
  • ./build.sh archive
  • verified generated bundle embeds Sparkle.framework and has @executable_path/../Frameworks rpath
  • swift test
  • swift run FlightBench passed on rerun; the first run had a noisy heavy-conversation p99 miss at 8.232 ms vs 8.0 ms while all other targets passed
  • parsed .github/workflows/release.yml and .github/workflows/pr.yml as YAML

The Apple signing/notarization path is not executed locally because the Developer ID cert and notary credentials are not available in this checkout.

@rosslazer rosslazer requested a review from nickdirienzo April 25, 2026 14:38
@rosslazer
Copy link
Copy Markdown
Contributor Author

@nickdirienzo I don't have an apple developer account but if you add ze secrets and set up the app in the portal this should allow auto updates so we aren't doing a git clone and build each time

@nickdirienzo nickdirienzo force-pushed the codex/github-release-updates branch from 5fd301d to d82eccb Compare April 26, 2026 06:38
rosslazer and others added 5 commits April 27, 2026 17:08
- Pin actions/checkout to a full commit SHA (v6.0.2) in both workflows so a
  retag on actions/checkout cannot silently change what we run.
- Default both workflows to `permissions: {}` and grant `contents: write`
  only on the release job that needs it.
- Move the release job into a `release` GitHub Actions environment so the
  Apple/Sparkle secrets sit behind a required-reviewer gate, not just
  repo-write.
- Disable git-credential persistence on checkout — neither workflow pushes
  back to the repo.
- Add a Dependabot config for github-actions so the SHA pin gets bumped
  on a schedule instead of rotting in place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Releases stay fully automated on tag push. The `release` environment
remains for secret scoping, but no reviewer is required — tag protection
is the actual security boundary against an attacker pushing a v* tag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Trigger flips from `push: tags: v*` to `push: branches: main`. Every
  merge to main now ships a release; humans don't pick versions or pull
  triggers.
- Workflow computes the next CalVer tag (`YYYY.MM.MICRO`) by scanning
  prior `v<year>.<month>.*` tags and bumping the trailing counter.
- `gh release create` creates both the tag and the release in one shot,
  so we don't need git-write credentials on the runner.
- Drops `workflow_dispatch` and the critical-update / version-override
  inputs — there's no manual lever, hotfixes go through main, transient
  failures use "Re-run jobs".
- Doc reframes the security boundary from tag protection to branch
  protection on main, since the workflow itself creates the tags.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nickdirienzo nickdirienzo force-pushed the codex/github-release-updates branch from 6e6c23c to 4366e15 Compare April 28, 2026 00:08
@nickdirienzo nickdirienzo marked this pull request as ready for review April 28, 2026 00:09
CI runners are noisier than dev machines and routinely flake the 8ms
p99 budgets. Targets remain strict for local runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nickdirienzo nickdirienzo merged commit 1ba95d0 into main Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants