Skip to content

build: migrate release.yml to ushr + fastlane match#11

Open
paddo wants to merge 1 commit into
mainfrom
feat/fastlane-match-ushr
Open

build: migrate release.yml to ushr + fastlane match#11
paddo wants to merge 1 commit into
mainfrom
feat/fastlane-match-ushr

Conversation

@paddo
Copy link
Copy Markdown
Contributor

@paddo paddo commented May 12, 2026

Migrates the release pipeline off the legacy persistent self-hosted runner (which had the Developer ID cert pre-installed in its login keychain) onto ushr's ephemeral macOS VMs.

Why

  • One Mac under the desk runs all CI now via ushr, the cross-org runner pool. The persistent runner becomes an SPOF and a security drag (cert sitting in a long-lived keychain).
  • Ephemeral VMs cannot have the cert pre-installed. Pattern mirrors what trivialis already does for iOS distribution: pull cert from a private fastlane-match repo into a temp keychain per build.

What

  • New Gemfile, fastlane/Appfile, fastlane/Fastfile with sync_developer_id and cleanup_keychain lanes
  • release.yml switches to runs-on: [self-hosted, macOS, ARM64], adds bundle-install + match steps before the existing codesign/notarize/release/Homebrew flow, always cleans up afterwards
  • MATCH_GIT_URL is overridden inline to an HTTPS+token URL because the org-level value is SSH (works on home-server, doesn't work on a fresh ephemeral VM with no SSH key)

Required before this can run

  1. fastlane match developer_id has been run once locally so the cert lands in paddo-tech/fastlane-match/certs/developer_id/. Apple may issue a new Developer ID cert if the existing private key isn't on the local Mac — old binaries shipped with the previous cert remain valid until expiry.
  2. FASTLANE_MATCH_TOKEN secret is set on tether-cli or paddo-tech org (a PAT with Contents:Read on paddo-tech/fastlane-match).

Test plan

  • Run fastlane match developer_id locally to populate the match repo
  • Add FASTLANE_MATCH_TOKEN secret
  • Trigger workflow_dispatch with dry_run: true — verifies cert install + build + sign + notarize without creating a release
  • Then a real release after a tag-eligible push

Already in place

Org-level secrets already inherited: APPLE_ID, APPLE_TEAM_ID, APPLE_APP_PASSWORD, APP_STORE_CONNECT_API_KEY_CONTENT, MATCH_PASSWORD, KEYCHAIN_PASSWORD.

Replaces the persistent self-hosted runner with ushr's ephemeral macOS
VMs (runs-on: [self-hosted, macOS, ARM64]). The Developer ID Application
certificate is no longer pre-installed on the runner — instead it lives
encrypted in paddo-tech/fastlane-match and is installed into a fresh
temporary keychain per build.

Adds:
- Gemfile pulling in fastlane
- fastlane/Appfile (apple_id + team_id from env)
- fastlane/Fastfile with two lanes:
    sync_developer_id  - create temp keychain, fetch cert via match
    cleanup_keychain   - delete the temp keychain
  Pattern mirrors trivialis but scoped to a single Developer ID cert.

Workflow changes:
- bundle install + sync_developer_id steps before existing build/sign/notarize
- MATCH_GIT_URL overridden inline to use HTTPS+token form. Org-level
  MATCH_GIT_URL is SSH (works on home-server which has the key); ushr
  ephemeral VMs don't, so we need a token-bearing URL. Requires a new
  repo or org secret FASTLANE_MATCH_TOKEN (PAT with Contents:Read on
  paddo-tech/fastlane-match).
- Always-run cleanup step destroys the temp keychain + API key file.

Prerequisites before this can run successfully:
1. fastlane match developer_id has been run once locally to populate
   certs/developer_id/ in the match repo (Apple will create a new
   Developer ID cert if the existing one's private key isn't available).
2. FASTLANE_MATCH_TOKEN secret is set on tether-cli (or paddo-tech org).

The other org-level secrets (APPLE_ID, APPLE_TEAM_ID, APPLE_APP_PASSWORD,
APP_STORE_CONNECT_API_KEY_CONTENT, MATCH_PASSWORD, KEYCHAIN_PASSWORD)
are already present and inherited from paddo-tech.
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.

1 participant