Skip to content
Blog

App Store & Play Store Release Automation with Fastlane

Learn how to automate App Store and Play Store releases with Fastlane — code signing, screenshots, build, upload, and store metadata from a Fastfile.

Published on August 17, 2026

AI Assistant

Releasing an app by hand is a ritual of twenty manual steps: bump the build number, sign the binary, generate screenshots, upload to the store, submit for review. It’s error-prone, slow, and takes hours every time you ship. Fastlane is the automation layer that turns that ritual into a single command. It handles code signing, builds, screenshots, uploads, and store metadata — and it runs equally well on your laptop or a CI server.

In this tutorial, you will learn how to set up Fastlane for an Android and iOS app, write lanes that build, sign, and upload to the Play Store and App Store, and wire the whole thing into CI. Key technologies: Fastlane, a Fastfile, code signing, and TestFlight/Play Console uploads.

Prerequisites

  • Ruby 3.0+ (Fastlane prefers Ruby 3.3+)
  • For iOS: a Mac with Xcode, an Apple Developer account, and an App Store Connect API key
  • For Android: an Android project, signing keystore, and a Google Play service account
  • Bundler (recommended for managing the Fastlane gem)

Core Content

Install Fastlane

The recommended setup pins the Fastlane version in a Gemfile so everyone on the team and your CI uses the same one:

source "https://rubygems.org"

gem "fastlane"

Then:

gem install bundler
bundle install

Commit both Gemfile and Gemfile.lock, and run Fastlane via bundle exec fastlane.

Initialize and configure

Inside your app directory, Fastlane scans the project and generates the configuration files:

cd ios    # or the Android project root
bundle exec fastlane init

This creates the fastlane/ folder with a Fastfile (your lanes), Appfile (app identifiers and team), and per-platform setup.

Write lanes

A Fastfile groups named lanes. Here’s an iOS beta and release pair:

fastlane_require "fastlane"

lane :beta do
  increment_build_number
  sync_code_signing
  build_app(scheme: "MyApp")
  upload_to_testflight
end

lane :release do
  capture_screenshots
  build_app(scheme: "MyApp")
  upload_to_app_store
  slack(message: "MyApp #{version} is live! 🎉")
end

The release lane captures screenshots, builds, uploads, and notifies the team — one command replaces the whole manual release.

Android lanes

Android lanes are similar but skip code signing if you use Gradle signing configs. A typical Play Store release:

platform :android do
  lane :beta do
    gradle(task: "assembleRelease")
    upload_to_play_store(
      track: "internal",
      aab: "app/build/outputs/bundle/release/app-release.aab"
    )
  end

  lane :release do
    gradle(task: "assembleRelease")
    upload_to_play_store(
      track: "production",
      aab: "app/build/outputs/bundle/release/app-release.aab"
    )
  end
end

Authentication without passwords

Never put passwords or keys in the repo. Fastlane prefers API-based auth:

  • App Store Connect: generate an API key in App Store Connect, store its .p8 file outside the repo, and reference the key ID and issuer in your env. Fastlane then signs in without your Apple ID password.
  • Google Play: create a service account in Google Cloud, grant it access in Play Console, and download its JSON key. Upload the credentials file (or set FASTLANE_SERVICE_ACCOUNT_JSON in CI secrets).

Integrate with CI

Fastlane was built for CI. On GitHub Actions, a release job looks like:

name: Release
on:
  push:
    tags: ['v*']

jobs:
  beta:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - run: bundle install
      - run: bundle exec fastlane beta
        env:
          FASTLANE_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
          SUPPLY_UPLOAD_MAX_RETRIES: 3

The same lane runs identically locally and in CI because all secrets come from environment variables.

Generate screenshots with fastlane_screenshot

Fastlane’s screenshot tooling automates capturing store screenshots:

bundle exec fastlane snapshot

It boots your app, walks through scripts you define, and captures screenshots on the device sizes you specify — no manual screenshotting across dozens of devices.

Putting It All Together

A complete release pipeline has a Fastfile with beta and release lanes, API-based authentication (App Store Connect API key / Play service account), signing handled either by Fastlane or Gradle, and a CI job that runs the lanes on tag pushes. Releasing is now bundle exec fastlane release from any machine, reproducible and auditable.

Conclusion & Next Steps

You’ve automated the entire store release: install, init, lanes, authentication, and CI wiring. Releases that took hours are now one command.

Next Steps: add fastlane match for code-signing certificate management, use fastlane deliver to sync localized store metadata from a file, and add fastlane lanes documentation to the team so everyone knows what each lane does.

References: