Building Automated iOS and Android CI/CD Pipelines for React Native
A mobile pipeline should make releases repeatable. The goal is not to automate everything immediately; it is to make each step reproducible, observable, and easy to roll back when something goes wrong.
This walkthrough uses Azure DevOps terminology and an Expo/React Native app with generated or maintained native projects. The same overall stages work in GitHub Actions or other CI systems.
A practical pipeline shape
Pull request
└─ install → typecheck → lint → tests
Main or release branch
└─ install → native build → signed IPA/AAB artifacts
Approved release
├─ existing IPA → TestFlight
└─ existing AAB → Google Play Internal testing
Separating build and deploy matters. You should be able to approve and promote an already-built artifact without rebuilding it from a slightly different dependency state.
1. Make local builds deterministic
Commit a lockfile and use a fixed Node version. In CI, prefer the package manager's frozen install mode:
npm ci
npx tsc --noEmit
npm run lint
npm test -- --watch=false
Adapt commands to the scripts your repository actually provides. Run these checks before consuming a macOS build agent.
If your app relies on Expo config plugins and Continuous Native Generation, run npx expo prebuild as part of your controlled native build workflow; don't regenerate native directories unexpectedly in an unrelated validation stage.
2. Build on the right agents
- iOS requires macOS and a compatible Xcode installation for native builds and signing.
- Android can build on Linux or macOS with the correct JDK and Android SDK.
- Pin toolchain versions instead of assuming
latestwill continue producing the same result.
For an existing native project, typical local commands look like:
# Android signed release output requires signing configuration.
cd android && ./gradlew bundleRelease
# iOS: archive/sign with an Xcode scheme and export options.
# Exact xcodebuild flags depend on the workspace, scheme and signing setup.
For teams using EAS Build, the pipeline can instead submit a build job to EAS; this article focuses on managing your own native build artifacts.
3. Handle signing outside source control
For Android, protect the keystore, passwords, and signing properties with Azure secure files and secret variables. For iOS, manage certificates and provisioning profiles through secure storage, an established signing tool (such as Fastlane match), or another approved signing process.
Never commit private signing keys or print secrets in build logs. Limit which branches and service connections can use release secrets.
4. Publish immutable artifacts
After building, publish at least:
- Android
.aabfor Play Store upload. - iOS signed
.ipafor TestFlight upload. - Build metadata: commit SHA, app version, build number, environment, and toolchain versions.
- Symbolication artifacts such as Android mapping files and iOS dSYMs where applicable.
An Azure DevOps pipeline can pass artifacts between stages:
# Illustrative snippet from a deployment job
steps:
- download: current
artifact: android-aab
- script: |
find "$(Pipeline.Workspace)/android-aab" -name '*.aab' -print
displayName: Inspect downloaded AAB
This snippet downloads and inspects the artifact; it does not publish to Google Play. Use the Google Play service connection and its release task (or an authenticated publishing tool) for the upload.
5. Gate distribution with approvals
Configure an Azure DevOps Environment for internal app distribution, then place the approval check on that environment. The deployment job should reference that environment so it cannot proceed until an authorized reviewer approves it.
For Android, deploy the existing AAB to Google Play Internal testing, not production. For iOS, upload the existing signed IPA to TestFlight. Both platforms also impose their own store permissions, processing, and review requirements.
Use service credentials with the minimum permissions necessary. Validate that the Google Play app/package name matches the artifact and that the version code is higher than the last uploaded version.
6. Keep release stages independently retryable
A resilient pipeline allows the Android upload to retry without rebuilding iOS or Android. Similarly, a TestFlight processing delay should not invalidate an otherwise successful Android build.
Record artifact hashes and release identifiers so you know exactly what was shipped. Keep each store release associated with the originating Git commit.
Common release failures
| Symptom | Where to look |
|---|---|
| Play rejects AAB | Version code, package name, signing key, permissions |
| TestFlight upload fails | Bundle ID, provisioning, build number, App Store Connect access |
| Local build works but CI fails | Xcode/JDK/SDK versions, environment secrets, cached dependencies |
| OTA update breaks older binaries | Runtime version compatibility and native dependency changes |
| Approval isn't enforced | Deployment job's environment and its configured checks |
A simple maturity path
- Automate static checks and tests.
- Produce signed IPA and AAB artifacts consistently.
- Distribute to internal testers from those existing artifacts.
- Add approvals, audit metadata, and notifications.
- Promote to production only after internal validation.
Avoid building a complicated release platform before you have reliable, reproducible builds. A small pipeline with good logs and explicit approvals is often enough.