Skip to content

feat(ios): wire ASC API key into fastlane pipeline - #16

Open
m-awadi wants to merge 1 commit into
feat/ios-appfrom
feat/ios-fastlane-pipeline
Open

feat(ios): wire ASC API key into fastlane pipeline#16
m-awadi wants to merge 1 commit into
feat/ios-appfrom
feat/ios-fastlane-pipeline

Conversation

@m-awadi

@m-awadi m-awadi commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds App Store Connect API-key auth to fastlane so TestFlight uploads run without Apple ID password prompts (and later, in CI).

Layered on top of PR #12 (feat/ios-app) since the iOS project only exists on that branch.

Changes

  • Fastfile — new load_app_store_connect_api_key helper reads fastlane/.env and hands the key to downstream pilot/deliver actions via lane context.
  • New upload lane — pushes a pre-built IPA to TestFlight (no rebuild, no git ops).
  • New beta_no_git lane — builds + uploads on the current project.yml version, no git ops. Handy for TestFlight iteration on a dirty tree.
  • before_all now scopes ensure_git_status_clean to :beta and :release only — test, build_only, screenshots, validate_metadata, upload, and beta_no_git no longer require a clean tree.
  • beta, release, screenshots all invoke load_app_store_connect_api_key before their upload steps.
  • .env.example template documenting the three required env vars.

Secrets handling

  • .env (Key ID / Issuer ID / .p8 path) is gitignored — verified via git check-ignore.
  • .p8 lives at ~/.appstoreconnect/private_keys/AuthKey_<KEY_ID>.p8 (chmod 600), never in the repo.
  • For CI: provide the three vars via GitHub Actions secrets; write the .p8 to disk at job start and point APP_STORE_CONNECT_API_KEY_KEY_FILEPATH at it.

Test plan

  • Copy fastlane/.env.example.env, fill in Key ID / Issuer ID / path
  • Place .p8 at ~/.appstoreconnect/private_keys/AuthKey_<KEY_ID>.p8 (chmod 600)
  • Run fastlane lanes — new upload and beta_no_git lanes appear
  • Bump CURRENT_PROJECT_VERSION in project.yml, regenerate xcodeproj, run fastlane beta_no_git — build should land in TestFlight after Apple processing
  • Confirm fastlane beta on a clean tree still works end-to-end (build → upload → commit → tag → push)

Adds env-based ASC API-key auth (Key ID, Issuer ID, .p8 path) so beta,
release, screenshots, and the new upload/beta_no_git lanes can push to
TestFlight without Apple ID password prompts.

- Fastfile: load_app_store_connect_api_key helper reads from fastlane/.env
  and calls app_store_connect_api_key so downstream pilot/deliver actions
  pick it up via lane context.
- New upload lane: pushes a pre-built IPA (no rebuild, no git ops).
- New beta_no_git lane: builds+uploads using current project.yml version
  without touching git; handy for ad-hoc TestFlight iterations while the
  working tree is dirty.
- before_all: ensure_git_status_clean is now scoped to :beta and :release
  only so non-git lanes (upload, beta_no_git, test, build_only,
  screenshots, validate_metadata) run against a dirty tree.
- .env.example: template so contributors know which vars to fill.
  The real .env is gitignored via the root .gitignore.
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