Skip to content

Self-polling release automation + version-lock to daemon v1.12.5 - #14

Merged
TeoSlayer merged 1 commit into
mainfrom
chore/release-automation
Jul 13, 2026
Merged

TeoSlayer merged 1 commit into
mainfrom
chore/release-automation

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Why

sdk-swift was a dead distribution channel — stale at v0.2.0 (2026-05-27). Package.swift pinned Pilot.xcframework.zip from that May release, and the repo had no release-watch and no publish workflow, so Swift consumers were frozen on May binaries while the daemon shipped through v1.12.5.

What this does

Gives sdk-swift the same self-polling pattern the npm/PyPI SDKs use:

  • release-watch.yml — polls pilot-protocol/pilotprotocol every 30 min (+ manual dispatch). When the daemon release is newer than the latest sdk-swift release, it dispatches publish.yml at that version. Same-repo, built-in GITHUB_TOKEN, no new secrets.
  • publish.yml (macos-latest) — builds Pilot.xcframework from the pilot-protocol/libpilot cgo bindings pinned to the requested daemon version (iOS device + iOS simulator + macOS arm64 slices via xcodebuild -create-xcframework), computes its SHA-256, rewrites Package.swift's binaryTarget url + checksum, commits + tags vX.Y.Z, pushes the tag (tags aren't branch-protected), best-effort fast-forwards main, and creates the GitHub Release with the xcframework attached. Idempotent (skips mutating steps if the release exists).
  • Package.swift + CHANGELOG rebased onto daemon v1.12.5. The binaryTarget checksum matches the v1.12.5 Pilot.xcframework.zip release asset.

Note the deliberate 0.2.0 -> 1.12.5 version-lock bump (mirrors what the npm SDK did): the SDK now tracks the daemon version.

Verified end-to-end

  • xcframework built cleanly from libpilot (deps public, pilotprotocol v1.12.5) on darwin/Xcode 26.
  • swift build against the freshly-built framework: Build complete.
  • swift package compute-checksum == shasum -a 256 == the value baked into Package.swift.
  • Manifest parses (swift package dump-package).

🤖 Generated with Claude Code

sdk-swift was a dead distribution channel: stale at v0.2.0 (2026-05-27),
with no release-watch/publish workflow, so Swift consumers were stuck on
May binaries while the daemon shipped through v1.12.5.

This adds the same self-polling pattern the npm/PyPI SDKs use:

- release-watch.yml: polls pilot-protocol/pilotprotocol every 30 min and,
  when the daemon is newer than the latest sdk-swift release, dispatches
  publish.yml at that version (same-repo, built-in token).
- publish.yml (macos-latest): builds Pilot.xcframework from the libpilot
  cgo bindings pinned to the requested daemon version, computes its SHA-256,
  rewrites Package.swift's binaryTarget url + checksum, commits + tags, pushes
  the tag, best-effort syncs main, and creates the release with the
  xcframework attached. Idempotent.
- Package.swift + CHANGELOG rebased onto daemon v1.12.5 (checksum matches the
  v1.12.5 Pilot.xcframework.zip release asset).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TeoSlayer
TeoSlayer merged commit 61e2a13 into main Jul 13, 2026
1 of 3 checks passed
@TeoSlayer
TeoSlayer deleted the chore/release-automation branch July 13, 2026 12:50
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