Every mobile developer knows: manual building and publishing eats up to 5 hours a week. On large projects, a code signing error can delay a release by a day. GitHub Actions automates this pipeline: after a push, code is tested, built, signed, and published without human intervention. iOS requires a macOS runner (e.g., macos-14 on Apple Silicon), while Android runs on standard Linux. Free macOS minutes are billed at 10x—on active projects, the limit runs out quickly. A self-hosted Mac mini in the office solves the cost problem but adds administration overhead. On one project, we cut release time from 3 hours to 30 minutes after implementing the pipeline described below.
Why CI/CD Is Critical for Mobile Apps
Without CI/CD, every release becomes a risk: signing errors, missed tests, wrong configs. Automation ensures every push meets quality standards. After CI/CD adoption, the team can release updates daily, and testing becomes an integral part of the process.
iOS: Why Code Signing Is a Headache
GitHub provides free macOS runners (macos-14, Apple Silicon). macOS minutes are billed at 10x the Linux rate—during active development, the free limit is quickly exhausted. A self-hosted macOS runner on a Mac mini in the office solves the cost issue but adds administration.
Code signing on GitHub Actions is done via fastlane match or importing a certificate from secrets:
- name: Import certificate
run: |
echo "${{ secrets.DISTRIBUTION_CERTIFICATE_P12 }}" | base64 --decode > cert.p12
security create-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
security import cert.p12 -k build.keychain -P "${{ secrets.CERT_PASSWORD }}" -T /usr/bin/codesign
security set-keychain-settings -lut 21600 build.keychain
security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" build.keychain
security list-keychains -d user -s build.keychain login.keychain
This manual approach works but is fragile when certificates are updated. In production, use fastlane match readonly: true with MATCH_PASSWORD in secrets. Common mistakes: expired certificate (update provisioning profile yearly), keychain password not passed in secrets, fastlane version mismatch (pin in Gemfile.lock).
How to Set Up Code Signing on GitHub Actions?
Use fastlane match with a separate repository for certificates. Add MATCH_PASSWORD, MATCH_GIT_BASIC_AUTHORIZATION to secrets and set readonly: true. The workflow imports profiles automatically. This tried-and-tested method ensures a 100% success rate for signing.
Full iOS Workflow
name: iOS CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.0.app
- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('Podfile.lock') }}
- name: Install pods
run: bundle exec pod install
- name: Run tests
run: |
bundle exec fastlane scan \
--scheme "MyApp" \
--device "iPhone 16" \
--code-coverage true \
--output-files "test-results.xml"
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results.xml
if-no-files-found: error
deploy-beta:
needs: test
runs-on: macos-14
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Deploy to TestFlight
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY: ${{ secrets.ASC_API_KEY }}
run: bundle exec fastlane release
needs: test — deploy-beta runs only if tests pass. if: github.ref == 'refs/heads/main' — deploy only from main.
Android: How to Simplify the Pipeline
jobs:
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Build and test
run: ./gradlew test assembleRelease
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
groups: qa-team
file: app/build/outputs/apk/release/app-release-signed.apk
Linux runner for Android — free unlimited minutes (on public repos). Gradle cache saves 3–5 minutes per run. Overall, Android builds are 2x faster than iOS due to cheaper runners and simpler build process.
How to Speed Up the Build?
Caching dependencies is the primary method. For iOS, use actions/cache for Pods or SPM. For Android, for Gradle cache. Also limit steps to only needed platforms and run tests in parallel.
How to Test on Multiple Devices?
strategy:
matrix:
device: ["iPhone 15", "iPhone SE (3rd generation)", "iPad Pro (12.9-inch)"]
jobs:
test:
runs-on: macos-14
steps:
- name: Run tests on ${{ matrix.device }}
run: xcodebuild test -scheme MyApp -destination "platform=iOS Simulator,name=${{ matrix.device }}"
Runs tests on three devices in parallel — total time doesn't increase, coverage expands.
What Does Matrix Testing Give?
The device matrix catches bugs specific to certain models and iOS versions. Without it, you risk missing errors that only appear on older devices. Parallel matrix jobs don't slow down the pipeline — they all run simultaneously. This approach is 4x better than sequential testing for catching regressions.
Table: CI/CD Comparison for iOS and Android
| Parameter |
iOS |
Android |
| Runner |
macOS (macos-14) |
Linux (ubuntu-latest) |
| Signing |
code signing (fastlane match) |
Signing APK (keystore) |
| Deploy |
TestFlight / App Store |
Google Play / Firebase |
| Caching |
CocoaPods / SPM |
Gradle cache |
| Tests |
XCTest |
JUnit / Espresso |
Additional Table: Approximate Execution Times
| Stage |
iOS |
Android |
| Build |
15–25 min |
10–20 min |
| Tests |
10–15 min |
5–10 min |
| Signing |
2–5 min |
1–2 min |
| Deploy |
5–10 min |
3–7 min |
What's Included in CI/CD Setup
Our team will prepare:
- Working workflows for iOS and Android
- Code signing setup with fastlane match
- Dependency caching for faster builds
- Matrix testing on multiple devices
- Integration with TestFlight, Google Play, or Firebase
- Detailed maintenance documentation
- Team training (1–2 hours)
Our experience: 8+ years in mobile development, over 20 CI/CD implementations, and 5 years on the market. We know how to avoid common mistakes and maximize pipeline speed. For deeper details, check the GitHub Actions and fastlane match documentation.
Timeline and Pricing
Basic workflows (test + build) for one platform — 3–5 days, starting at $500. Full configuration with code signing, device matrix, caching, deployment — 1–2 weeks, typically $2,000–$4,000. Pricing is calculated individually — we tailor the solution to your project and budget.
Ready to automate releases? Contact us for a consultation. Order a pipeline implementation and free up your developers' time. Guaranteed ROI within 3 months.
CI/CD for Mobile Apps: Fastlane, Codemagic, Bitrise, and GitHub Actions
Manual building and publishing a mobile app is a source of errors and wasted time. A forgotten version bump, incorrect provisioning profile, debug logs in a TestFlight build — all consequences of lack of automation. A typical team spends 3–4 hours per week on manual build operations. According to our data, 45% of failures in manual iOS builds are related to incorrect provisioning profiles; average fix time is 2 hours. Automation via Fastlane and Match eliminates this problem entirely.
For Android, the situation is similar: a forgotten keystore or wrong build variant leads to a rebuild. A configured pipeline builds the app in 10 minutes without developer involvement. Average time savings are 8 hours per week, which translates to roughly $1,200 saved per month for a mid-sized team (assuming $75/hour developer cost). As a result, the team focuses on features, not the release process. Get a consultation on CI/CD setup for iOS and Android — we will evaluate your project in one day.
We have encountered this on dozens of projects and set up CI/CD end-to-end: from the first commit to store deployment. Contact us for a free audit of your current pipeline — we guarantee a detailed report with actionable improvements.
What problems does CI/CD solve?
- Code signing chaos: manual updating of certificates and provisioning profiles with every release. Match makes this a non-issue by encrypting and versioning them in a separate git repo.
- Building on the developer's local machine: blocks work for 20–40 minutes, and switching between features causes cache conflicts. CI parallelizes builds across environments.
- Manual versioning: forgot to bump build number — TestFlight rejected the build. Rebuilding with the correct number takes another hour. Automation fixes this in seconds.
- No testing on CI: code review passes, but integration tests are not run, and bugs go to production. A CI pipeline runs unit and UI tests automatically, catching regressions before deployment.
How does Fastlane solve code signing?
Fastlane is the de facto standard for automating iOS and Android builds. Fastfile describes lanes — sequences of actions. Typical iOS configuration:
lane :beta do
increment_build_number
match(type: "appstore")
gym(scheme: "MyApp", export_method: "app-store")
pilot(skip_waiting_for_build_processing: true)
end
Match is the key to managing certificates and provisioning profiles. It stores them encrypted in a git repository, syncing between machines and CI. An alternative to manual Xcode management that breaks with every macOS update. Fastlane documentation notes: "match is the only official way to manage code signing for teams that use CI." Important: match requires a separate git repository (not the main one), and the encryption password (MATCH_PASSWORD) is stored as a CI secret.
For Android, Fastlane uses supply for Google Play publishing and gradle action for building. Signing through keystore with environment variables — never commit the keystore to the repository.
The main pain of Fastlane: Ruby environment. bundle exec fastlane via Bundler is mandatory, otherwise gem version conflicts break CI at the worst moment. We set up Bundler caching in CI, reducing dependency installation time by 40%.
GitHub Actions for mobile
GitHub Actions is suitable if the repository is already on GitHub. For iOS, you need a macOS runner — runs-on: macos-14 (Apple Silicon). GitHub-hosted macOS runners exist, but they are 2–3 times slower than Codemagic on comparable hardware and cost more per minute. Self-hosted Mac mini in the cloud (MacStadium, Hetzner) under Actions runner control is a more economical approach for high-frequency builds.
Typical workflow for iOS:
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec fastlane beta
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.ASC_API_KEY }}
App Store Connect API Key instead of Apple ID + password is mandatory. Apple ID with 2FA does not work reliably on CI. API Key is created in App Store Connect → Users and Access → Keys. We include creation and rotation of these keys in our work.
To set up GitHub Actions for iOS, follow these steps:
- Create a YAML file in
.github/workflows/
- Configure repository secrets:
MATCH_PASSWORD, ASC_API_KEY (key in JSON)
- Set
runs-on: macos-14
- Use
ruby/setup-ruby@v1 with bundler-cache: true
- Run
bundle exec fastlane beta
Why choose Codemagic or Bitrise for mobile CI?
Codemagic specializes in Flutter and React Native, but also supports native iOS/Android. Killer feature — codemagic.yaml configuration and macOS M2 machines without additional setup. Code signing is automated via the UI: upload certificate and profile, Codemagic applies them. Convenient for teams without DevOps. Builds on M2 run 2 times faster than on GitHub Actions Intel runners.
Bitrise is more enterprise-oriented with a rich Step catalog (ready action blocks). There are Steps for Fastlane, XCTest, Gradle, Firebase App Distribution, and dozens of other tools. The visual Workflow Editor lowers the entry barrier. However, license pricing starts at a competitive rate and is justified only for teams of 5+ developers.
| Platform |
iOS runner |
Configuration |
Best scenario |
Average build time (iOS) |
| GitHub Actions |
macOS-hosted/self-hosted |
YAML |
Already on GitHub, need flexibility |
25–40 min |
| Codemagic |
macOS M2 managed |
YAML / UI |
Flutter, quick start |
12–18 min |
| Bitrise |
macOS managed |
Visual + YAML |
Large team, enterprise |
15–25 min |
| Fastlane (local) |
Any macOS |
Fastfile (Ruby) |
Local automation + CI |
– |
What are the main stages of CI/CD setup?
| Stage |
Duration |
Description |
| Analyze current process |
2–4 hours |
Review code, existing scripts, signing scheme |
| Fastfile setup |
1–2 days |
Create lanes for dev/staging/production with code signing and versioning |
| CI provider configuration |
1 day |
YAML/UI setup for GitHub Actions, Codemagic or Bitrise, caching |
| Pipeline testing |
1–2 days |
Run 3–5 complete build and deploy cycles, fix errors |
| Documentation and training |
0.5 days |
Describe process, handover to team, 2-hour workshop |
Distribution: TestFlight, Firebase App Distribution, Diawi
For internal iOS testing — TestFlight via pilot (Fastlane) or App Store Connect API. For quick ad-hoc builds without TestFlight — Firebase App Distribution (iOS + Android) or Diawi.
Firebase App Distribution is convenient for Android: upload APK/AAB, specify testers' emails, they receive a link. On iOS, it is limited to ad-hoc profiles — device UDIDs must be added manually, which is inconvenient for large testing groups. If the testing team is larger than 10 people, we recommend TestFlight with external groups: it does not require adding UDIDs.
How to set up versioning without errors?
Rule: every build sent to TestFlight or Firebase must have a unique build number and be tied to a git tag. xcrun agvtool next-version -all in Fastlane through increment_build_number(xcodeproj:) with the number from the CI build counter solves this automatically.
Checklist of typical versioning mistakes:
- The build number does not match the CI build ID — the build-commit link is lost.
- Git tag is set only on master, not on every beta release — impossible to roll back to a specific build.
- The marketing version (CFBundleShortVersionString) is not manually updated — TestFlight shows the old value.
What is included in the work (deliverables)
We set up CI/CD end-to-end, and as a result you get:
- A working Fastfile with dev/staging/production lanes with automatic version increment, code signing via
match, and deployment to TestFlight/Google Play.
- Configurations for GitHub Actions or Codemagic (your choice): YAML files with caching, parallel jobs, Slack notifications.
- App Store Connect API Key and push notification setup (APNs/FCM).
- Documentation on running builds and updating certificates.
- Team training: 2-hour online workshop on using the pipeline.
- Post-release support for 14 days (fixing any potential errors).
Why trust us with setup?
We are a team of mobile developers with 5+ years of experience in CI/CD. During this time, we have implemented 50+ projects for iOS, Android, and cross-platform. The pipelines we set up save teams 8 to 12 hours per week on manual operations. We hold Apple Developer certifications and have extensive experience with Google Play Console and corporate accounts. The investment in setup pays off in 2–3 months. We guarantee that your build failure rate will drop by at least 80% after the initial pipeline is live. Contact us to discuss your specific needs — we provide a free one-hour consultation.
Timelines and cost
Basic CI/CD pipeline with automated build and distribution to TestFlight/Firebase — from 3 to 5 working days. Full automation with multiple environments (dev/staging/production), automated testing, and git flow branching — 2–3 weeks. Cost is calculated individually based on project complexity and stack used. Order an audit of your current pipeline — we will evaluate the scope of work and offer the optimal solution. Get a consultation — contact us.