jpskill.com
🛠️ 開発・MCP コミュニティ

fastlane

Automate mobile app builds, signing, and deployment with Fastlane — CI/CD for iOS and Android. Use when someone asks to "automate App Store deployment", "Fastlane", "automate iOS build", "CI/CD for mobile", "automate Play Store upload", "code signing automation", or "mobile release pipeline". Covers build automation, code signing, TestFlight, Play Store, screenshots, and CI.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fastlane.zip https://jpskill.com/download/14891.zip && unzip -o fastlane.zip && rm fastlane.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14891.zip -OutFile "$d\fastlane.zip"; Expand-Archive "$d\fastlane.zip" -DestinationPath $d -Force; ri "$d\fastlane.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して fastlane.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → fastlane フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Fastlane

概要

Fastlane は、モバイルアプリのリリースにおける面倒な部分(ビルド、コード署名、TestFlight/Play Store へのアップロード、スクリーンショットの撮影、証明書の管理)を自動化します。コードから本番環境への移行を1つのコマンドで行えます。ほとんどのプロのモバイルチームが、手動の Xcode/Google Play Console ワークフローを排除するために使用しています。

使用場面

  • App Store / Play Store への手動公開が苦痛である
  • コード署名がチームメンバー間で悪夢である
  • モバイルビルドに自動化された CI/CD が必要である
  • ストアリスティング用に自動化されたスクリーンショットが必要である
  • 証明書とプロビジョニングプロファイルを管理する必要がある

手順

セットアップ

# インストール
brew install fastlane  # macOS
# または: gem install fastlane

# プロジェクト内で初期化
cd my-app
fastlane init

iOS の設定

# fastlane/Fastfile — iOS のビルドとデプロイの自動化
default_platform(:ios)

platform :ios do
  desc "新しいベータビルドを TestFlight にプッシュ"
  lane :beta do
    # ビルド番号をインクリメント
    increment_build_number(
      build_number: latest_testflight_build_number + 1
    )

    # アプリをビルド
    build_app(
      workspace: "MyApp.xcworkspace",
      scheme: "MyApp",
      export_method: "app-store",
    )

    # TestFlight にアップロード
    upload_to_testflight(
      skip_waiting_for_build_processing: true,
    )

    # チームに通知
    slack(
      message: "New iOS beta uploaded to TestFlight! 🚀",
      slack_url: ENV["SLACK_WEBHOOK"],
    )
  end

  desc "App Store にデプロイ"
  lane :release do
    build_app(
      workspace: "MyApp.xcworkspace",
      scheme: "MyApp",
      export_method: "app-store",
    )

    upload_to_app_store(
      force: true,  # HTML プレビューの検証をスキップ
      submit_for_review: true,
      automatic_release: true,
      precheck_include_in_app_purchases: false,
    )
  end

  desc "match でコード署名を管理"
  lane :certificates do
    match(
      type: "appstore",
      app_identifier: "com.mycompany.myapp",
      readonly: true,
    )
  end
end

Android の設定

# fastlane/Fastfile — Android のビルドとデプロイ
platform :android do
  desc "Google Play の内部テストにビルドしてアップロード"
  lane :beta do
    gradle(
      task: "clean assembleRelease",
      properties: {
        "android.injected.signing.store.file" => ENV["KEYSTORE_PATH"],
        "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
        "android.injected.signing.key.alias" => ENV["KEY_ALIAS"],
        "android.injected.signing.key.password" => ENV["KEY_PASSWORD"],
      },
    )

    upload_to_play_store(
      track: "internal",
      aab: "./app/build/outputs/bundle/release/app-release.aab",
    )
  end

  desc "内部テスト版を本番環境に昇格"
  lane :release do
    upload_to_play_store(
      track: "internal",
      track_promote_to: "production",
      rollout: "0.1",  # 10% ロールアウト
    )
  end
end

Match を使用したコード署名

# match を初期化 (証明書を Git リポジトリまたはクラウドに保存)
fastlane match init

# 証明書を生成
fastlane match development
fastlane match appstore

# CI 上 — 読み取り専用モード (新しい証明書を作成しない)
fastlane match appstore --readonly

CI 連携

# .github/workflows/release-ios.yml
name: iOS Release
on:
  push:
    tags: ["v*"]

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with: { bundler-cache: true }

      - name: Install CocoaPods
        run: pod install --project-directory=ios

      - name: Deploy to TestFlight
        env:
          APP_STORE_CONNECT_API_KEY: ${{ secrets.ASC_KEY }}
          MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
          MATCH_GIT_URL: ${{ secrets.MATCH_REPO }}
        run: fastlane ios beta

例 1: モバイル CI/CD のセットアップ

ユーザープロンプト: "iOS と Android のビルドを自動化してください。PR ごとにビルドし、タグごとに TestFlight/Play Store にデプロイします。"

エージェントは、ビルド、署名、デプロイのための Fastlane レーンを作成し、コード署名のために match をセットアップし、GitHub Actions ワークフローを構成します。

例 2: App Store のスクリーンショットを自動化

ユーザープロンプト: "必要なすべてのサイズの App Store スクリーンショットを自動的に生成します。"

エージェントは、UI テストで Fastlane snapshot をセットアップし、複数のデバイスサイズと言語でスクリーンショットをキャプチャし、デバイスベゼルでそれらをフレーム化します。

ガイドライン

  • テストには fastlane beta、本番環境には fastlane release — レーンを分離
  • コード署名には match — 証明書を Git に保存し、すべてのチームメンバーが同じものを使用
  • ビルド番号を自動的にインクリメントincrement_build_number または increment_version_code
  • iOS ビルドには macOS が必要 — GitHub Actions macOS ランナーを使用
  • シークレットには .env ファイル — キーストアパスワード、API キー
  • アプリのメタデータには Appfile — アプリ識別子、Apple ID、チーム ID
  • Play Store のメタデータには supply — 説明、変更ログ、スクリーンショット
  • precheck は送信前に検証 — よくあるリジェクト理由をキャッチ
  • レーンは構成可能 — あるレーンから別のレーンを呼び出す
  • プラグインは機能を拡張fastlane-plugin-firebase_app_distribution など
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Fastlane

Overview

Fastlane automates the tedious parts of mobile app releases — building, code signing, uploading to TestFlight/Play Store, taking screenshots, and managing certificates. One command to go from code to production. Used by most professional mobile teams to eliminate manual Xcode/Google Play Console workflows.

When to Use

  • Publishing to App Store / Play Store manually and it's painful
  • Code signing is a nightmare across team members
  • Need automated CI/CD for mobile builds
  • Want automated screenshots for store listings
  • Managing certificates and provisioning profiles

Instructions

Setup

# Install
brew install fastlane  # macOS
# Or: gem install fastlane

# Initialize in your project
cd my-app
fastlane init

iOS Configuration

# fastlane/Fastfile — iOS build and deploy automation
default_platform(:ios)

platform :ios do
  desc "Push a new beta build to TestFlight"
  lane :beta do
    # Increment build number
    increment_build_number(
      build_number: latest_testflight_build_number + 1
    )

    # Build the app
    build_app(
      workspace: "MyApp.xcworkspace",
      scheme: "MyApp",
      export_method: "app-store",
    )

    # Upload to TestFlight
    upload_to_testflight(
      skip_waiting_for_build_processing: true,
    )

    # Notify team
    slack(
      message: "New iOS beta uploaded to TestFlight! 🚀",
      slack_url: ENV["SLACK_WEBHOOK"],
    )
  end

  desc "Deploy to App Store"
  lane :release do
    build_app(
      workspace: "MyApp.xcworkspace",
      scheme: "MyApp",
      export_method: "app-store",
    )

    upload_to_app_store(
      force: true,  # Skip HTML preview verification
      submit_for_review: true,
      automatic_release: true,
      precheck_include_in_app_purchases: false,
    )
  end

  desc "Manage code signing with match"
  lane :certificates do
    match(
      type: "appstore",
      app_identifier: "com.mycompany.myapp",
      readonly: true,
    )
  end
end

Android Configuration

# fastlane/Fastfile — Android build and deploy
platform :android do
  desc "Build and upload to Google Play internal testing"
  lane :beta do
    gradle(
      task: "clean assembleRelease",
      properties: {
        "android.injected.signing.store.file" => ENV["KEYSTORE_PATH"],
        "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"],
        "android.injected.signing.key.alias" => ENV["KEY_ALIAS"],
        "android.injected.signing.key.password" => ENV["KEY_PASSWORD"],
      },
    )

    upload_to_play_store(
      track: "internal",
      aab: "./app/build/outputs/bundle/release/app-release.aab",
    )
  end

  desc "Promote internal to production"
  lane :release do
    upload_to_play_store(
      track: "internal",
      track_promote_to: "production",
      rollout: "0.1",  # 10% rollout
    )
  end
end

Code Signing with Match

# Initialize match (stores certs in Git repo or cloud)
fastlane match init

# Generate certificates
fastlane match development
fastlane match appstore

# On CI — read-only mode (don't create new certs)
fastlane match appstore --readonly

CI Integration

# .github/workflows/release-ios.yml
name: iOS Release
on:
  push:
    tags: ["v*"]

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with: { bundler-cache: true }

      - name: Install CocoaPods
        run: pod install --project-directory=ios

      - name: Deploy to TestFlight
        env:
          APP_STORE_CONNECT_API_KEY: ${{ secrets.ASC_KEY }}
          MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
          MATCH_GIT_URL: ${{ secrets.MATCH_REPO }}
        run: fastlane ios beta

Examples

Example 1: Set up mobile CI/CD

User prompt: "Automate our iOS and Android builds — build on every PR, deploy to TestFlight/Play Store on tag."

The agent will create Fastlane lanes for building, signing, and deploying, set up match for code signing, and configure GitHub Actions workflows.

Example 2: Automate App Store screenshots

User prompt: "Generate App Store screenshots in all required sizes automatically."

The agent will set up Fastlane snapshot with UI tests, capture screenshots in multiple device sizes and languages, and frame them with device bezels.

Guidelines

  • fastlane beta for testing, fastlane release for production — separate lanes
  • match for code signing — stores certs in Git, all team members use the same ones
  • Increment build number automaticallyincrement_build_number or increment_version_code
  • macOS required for iOS builds — use GitHub Actions macOS runners
  • .env files for secrets — keystore passwords, API keys
  • Appfile for app metadata — app identifier, Apple ID, team ID
  • supply for Play Store metadata — descriptions, changelogs, screenshots
  • precheck validates before submission — catches common rejection reasons
  • Lanes are composable — call one lane from another
  • Plugins extend functionalityfastlane-plugin-firebase_app_distribution etc.