feat(ios): wire ASC API key into fastlane pipeline - #16
Open
m-awadi wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
load_app_store_connect_api_keyhelper readsfastlane/.envand hands the key to downstream pilot/deliver actions via lane context.uploadlane — pushes a pre-built IPA to TestFlight (no rebuild, no git ops).beta_no_gitlane — builds + uploads on the currentproject.ymlversion, no git ops. Handy for TestFlight iteration on a dirty tree.before_allnow scopesensure_git_status_cleanto:betaand:releaseonly —test,build_only,screenshots,validate_metadata,upload, andbeta_no_gitno longer require a clean tree.beta,release,screenshotsall invokeload_app_store_connect_api_keybefore their upload steps..env.exampletemplate documenting the three required env vars.Secrets handling
.env(Key ID / Issuer ID / .p8 path) is gitignored — verified viagit check-ignore..p8lives at~/.appstoreconnect/private_keys/AuthKey_<KEY_ID>.p8(chmod 600), never in the repo..p8to disk at job start and pointAPP_STORE_CONNECT_API_KEY_KEY_FILEPATHat it.Test plan
fastlane/.env.example→.env, fill in Key ID / Issuer ID / path.p8at~/.appstoreconnect/private_keys/AuthKey_<KEY_ID>.p8(chmod 600)fastlane lanes— newuploadandbeta_no_gitlanes appearCURRENT_PROJECT_VERSIONinproject.yml, regenerate xcodeproj, runfastlane beta_no_git— build should land in TestFlight after Apple processingfastlane betaon a clean tree still works end-to-end (build → upload → commit → tag → push)