Mobile Fastlane

GitHub Actions

Last updated 2026-10-07

There are two manual workflows. Run them from Actions → Android Distribution / iOS TestFlight Distribution → Run workflow, then pick an environment (development, staging, uat or production).

Each workflow runs doctor, then distribute.

Secrets

AndroidiOS
FIREBASE_TOKEN (needed for AI tests)APP_STORE_CONNECT_KEY_ID
FIREBASE_SERVICE_ACCOUNT_JSON (full JSON, written to a temp file)APP_STORE_CONNECT_ISSUER_ID
FIREBASE_ANDROID_<ENV>_APP_ID, FIREBASE_ANDROID_<ENV>_GROUPSAPP_STORE_CONNECT_KEY_CONTENT (raw .p8)
FIREBASE_TEST_USERNAME, FIREBASE_TEST_PASSWORD (optional)APPLE_TEAM_ID
TEAMS_WEBHOOK_URL, SMTP_* (optional)MATCH_GIT_URL, MATCH_GIT_BRANCH, MATCH_PASSWORD (match only)
Note: the repository variable VERSION_NAME is optional. GITHUB_RUN_NUMBER is used as the build number automatically.

Add the secrets

  1. 1
    In GitHub open Settings → Secrets and variables → Actions → New repository secret (GitHub: using secrets).
  2. 2
    Add each value from the table. For multi-line values (service-account JSON, .p8), paste the whole content.
  3. 3
    Run the workflow from Actions → Run workflow (workflow_dispatch).

Minimal workflow

.github/workflows/android-distribution.yml (excerpt)
on:
workflow_dispatch:
inputs:
environment:
type: choice
options: [development, staging, uat, production]
jobs:
android:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 50 } # git release notes need history
- uses: actions/setup-java@v4
with: { distribution: temurin, java-version: 17 }
- uses: ruby/setup-ruby@v1
with: { bundler-cache: true } # reads .ruby-version + Gemfile.lock
- run: npm ci
- run: bundle exec fastlane android doctor environment:${{ inputs.environment }}
- run: bundle exec fastlane android distribute environment:${{ inputs.environment }}
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
Tip: to run a saved setup instead, replace the last two steps with bundle exec fastlane run_profile name:<profile>. See Profiles & CI.

Official documentation

Was this helpful?