Notes

React NativeFastlaneCI/CD

Shipping an Expo app with Fastlane instead of EAS

How we built and shipped a React Native app to both stores from GitHub Actions with Fastlane, and the traps between us and the first green build.

Applies to
Expo or React Native apps built and shipped with Fastlane from GitHub Actions, iOS signing through match, Android through Google Play.
Verified with
fastlane 2.236 to 2.237, Expo SDK 56 to 57, GitHub-hosted macOS and Linux runners, June to August 2026.

Expo's own build service, EAS, is the easy path. We skipped it, mostly to avoid the subscription, and built and shipped the app ourselves: Fastlane for the store work, GitHub Actions to run it, and Expo only for generating the native projects. It took some bruises to get right. Here's the shape that held up, and the traps worth knowing before you start.

The pipeline

  1. Beta buildany branch, to Firebase testers (iOS ad-hoc, Android APK)
  2. Testers sign offa tag records the exact commit they tested
  3. Store buildTestFlight or Play internal, built from that commit
  4. Test that buildon real devices, from the store's own channel
  5. Submit the same buildno rebuild; Play promotes the same versionCode
From beta to store, the commit testers signed off is the one that ships, and the binary that gets reviewed is the one people tested.

Each of these rules exists because the alternative went wrong at some point:

Betas come first

Every release starts as a beta. The beta workflow is the one people run most, so it's built to be quick to start and hard to misuse:

When the iOS beta succeeds, it pushes a tag recording the version, build and commit. The TestFlight and Play internal workflows then build from that tagged commit, so the store build is made from exactly the code testers already signed off, not whatever the branch has moved on to since.

The beta build also reads from our shared Nx cache, so libraries main already built don't get rebuilt on an expensive macOS runner.

macOS runner minutes cost roughly ten times Linux ones, and a cold release build of a New Architecture app took about 16 minutes. That's one more reason builds only run when someone asks for them.

Five breakages before the first green iOS build

In the order CI hit them. Expect the same set on a new pipeline.

  1. pnpm install returned 401 on a private package, because the install step had no registry auth.
  2. match couldn't use the keyless cloud credential. That credential file has no project ID, which match's storage backend requires. We gave match a real service-account key and kept keyless auth for everything else.
  3. The JS bundle couldn't find workspace libraries, because Fastlane's build calls xcodebuild directly and skips the monorepo's own dependency builds. Build those libraries first.
  4. codesign hung for about 22 minutes waiting on a keychain prompt nobody could answer. Run setup_ci before match; it creates a temporary keychain.
  5. The Crashlytics symbol upload looked in the wrong folder for Pods. Point it at the right path explicitly.

Also: Expo's prebuild leaves the iOS project on automatic signing with no team, so CI has to switch it to manual signing with the match profile after every prebuild.

Google Play traps

Making Android builds faster

Most of the Android job's time wasn't compiling. It was Gradle getting started: downloading the wrapper, resolving dependencies and configuring 60-odd modules. Caching the Gradle home folder, keyed on the lockfile and app.json, cut one job from 12 minutes 14 seconds to 7 minutes 23.

One trap: a gradlew clean step took 2 minutes 37 seconds and looked like waste. Removing it just moved that time into the next step, because it had been warming the Gradle daemon. Before blaming a step for its time, check whether the step after it got faster.

Signing and secrets

How to debug it without burning CI minutes

Reproduce the CI build locally in a separate git worktree, with a clean install, instead of waiting on 20-minute runs. And remember that composite actions and the Fastfile are read from the branch being built: if betas build a branch other than main, CI fixes have to land there too.