Skip to content
ci-cd-automation logo

CI/CD Automation Skill

ci-cd-automation

GitHub Actions、Fastlane、Bitriseを活用したCI/CDパイプライン構築。自動ビルド、テスト実行、コード署名、TestFlight配布、App Store申請まで、開発からリリースまでの完全自動化ガイド。

Gaku52/claude-code-skills0installs6stars

SKILL.md

Full skill instructions

CI/​CD Automation Skill

📋 目次

  1. 概要
  2. いつ使うか
  3. CI/​CDパイプライン設計
  4. GitHub Actions
  5. Fastlane
  6. ベストプラクティス
  7. よくある問題
  8. Agent連携

概要

このSkillは、CI/​CD自動化の全てをカバーします:

  • ✅ GitHub Actions ワークフロー設計
  • ✅ Fastlane完全活用
  • ✅ 自動ビルド・テスト
  • ✅ コード署名自動化
  • ✅ TestFlight自動配布
  • ✅ App Store自動申請
  • ✅ キャッシュ戦略
  • ✅ パイプライン最適化
  • ✅ シークレット管理

📚 公式ドキュメント・参考リソース

このガイドで学べること: CI/​CDパイプライン設計、GitHub Actions設定、Fastlane活用、自動デプロイ 公式で確認すべきこと: 最新のCI/​CD機能、セキュリティアップデート、パフォーマンス最適化

主要な公式ドキュメント

関連リソース


いつ使うか

自動的に参照されるケース

  • CI/​CDワークフローを修正する時
  • ビルドが失敗した時
  • デプロイが失敗した時

手動で参照すべきケース

  • 新規プロジェクトでCI/​CD構築
  • パイプライン最適化
  • 新しい自動化タスク追加
  • トラブルシューティング

CI/​CDパイプライン設計

基本パイプライン

┌──────────────┐
│  Push/​PR     │
└──────┬───────┘
       │
┌──────▼───────┐
│  Lint        │  SwiftLint, SwiftFormat
└──────┬───────┘
       │
┌──────▼───────┐
│  Build       │  Xcode Build
└──────┬───────┘
       │
┌──────▼───────┐
│  Test        │  Unit + UI Tests
└──────┬───────┘
       │
┌──────▼───────┐
│  Coverage    │  カバレッジレポート
└──────┬───────┘
       │
┌──────▼───────┐
│  Deploy      │  TestFlight (mainブランチのみ)
└──────────────┘

詳細: guides/​01-pipeline-design.md

高度なパイプライン

PR作成時:
  → Lint → Build → Unit Tests → Security Scan
  → レビュー待ち

mainマージ時:
  → 全テスト → Build Archive → TestFlight → Slack通知

タグプッシュ時:
  → 全テスト → Production Build → App Store → Release Notes

詳細: guides/​02-advanced-pipeline.md


GitHub Actions

基本ワークフロー

name: iOS CI

on:
  push:
    branches: [ main, develop ]
  pull_request:
    branches: [ main, develop ]

jobs:
  build-and-test:
    runs-on: macos-latest

    steps:
    - uses: actions/​checkout@v4

    - name: Setup Xcode
      uses: maxim-lobanov/​setup-xcode@v1
      with:
        xcode-version: '15.2'

    - name: Cache SPM
      uses: actions/​cache@v3
      with:
        path: .build
        key: ${{ runner.os }}-spm-${{ hashFiles('**/​Package.resolved') }}

    - name: Build
      run: xcodebuild build -scheme YourApp -destination 'platform=iOS Simulator,name=iPhone 15'

    - name: Test
      run: xcodebuild test -scheme YourApp -destination 'platform=iOS Simulator,name=iPhone 15'

詳細: guides/​03-github-actions-basics.md

ワークフロー例

詳細ガイド:


Fastlane

セットアップ

# Fastlane インストール
gem install fastlane

# 初期化
fastlane init

# プラグインインストール
fastlane add_plugin badge
fastlane add_plugin changelog

詳細: guides/​07-fastlane-setup.md

Fastfile例

default_platform(:ios)

platform :ios do
  desc "Run tests"
  lane :test do
    run_tests(scheme: "YourApp")
  end

  desc "Build and upload to TestFlight"
  lane :beta do
    increment_build_number
    build_app(scheme: "YourApp")
    upload_to_testflight
    slack(message: "New beta build available!")
  end

  desc "Release to App Store"
  lane :release do
    increment_version_number
    build_app(scheme: "YourApp")
    upload_to_app_store
    slack(message: "New version released!")
  end
end

詳細:


ベストプラクティス

キャッシュ戦略

# SPM依存関係
- uses: actions/​cache@v3
  with:
    path: .build
    key: ${{ runner.os }}-spm-${{ hashFiles('**/​Package.resolved') }}

# CocoaPods
- uses: actions/​cache@v3
  with:
    path: Pods
    key: ${{ runner.os }}-pods-${{ hashFiles('**/​Podfile.lock') }}

# Derived Data
- uses: actions/​cache@v3
  with:
    path: ~/​Library/​Developer/​Xcode/​DerivedData
    key: ${{ runner.os }}-derived-data

詳細: references/​caching-strategy.md

シークレット管理

# GitHub Secrets使用
env:
  MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
  APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}

詳細: references/​secrets-management.md

並列実行

jobs:
  lint:
    runs-on: macos-latest
    # ...

  test-ios15:
    runs-on: macos-latest
    # iOS 15でテスト

  test-ios16:
    runs-on: macos-latest
    # iOS 16でテスト

  test-ios17:
    runs-on: macos-latest
    # iOS 17でテスト

詳細: references/​parallel-execution.md


よくある問題

ビルド失敗

原因解決策
Xcodeバージョン不一致setup-xcode で固定
依存関係エラーキャッシュクリア
コード署名エラーFastlane Match使用

詳細: references/​troubleshooting.md

ビルド時間が長い

→ references/​build-optimization.md

TestFlight配布失敗

→ incidents/​testflight-failures/


Agent連携

このSkillを使用するAgents

  1. ci-runner-agent

    • CIパイプライン実行
    • Thoroughness: quick
  2. build-optimizer-agent

    • ビルド時間分析・最適化提案
    • Thoroughness: thorough
  3. deploy-agent

    • TestFlight/​App Store配布
    • Thoroughness: medium
  4. pipeline-debugger-agent

    • パイプライン失敗原因分析
    • Thoroughness: thorough

推奨Agentワークフロー

ビルド失敗時(順次実行)
pipeline-debugger-agent (原因分析)
→ 修正提案
→ ci-runner-agent (再実行)
パイプライン最適化時(並行実行)
build-optimizer-agent (ビルド最適化) +
test-optimizer-agent (テスト最適化) +
cache-analyzer-agent (キャッシュ分析)
→ 結果統合 → 最適化計画

クイックリファレンス

よく使うFastlaneコマンド

# テスト実行
fastlane test

# TestFlight配布
fastlane beta

# App Storeリリース
fastlane release

# スクリーンショット生成
fastlane snapshot

# 証明書同期
fastlane match development
fastlane match appstore

GitHub Actions手動実行

on:
  workflow_dispatch:
    inputs:
      environment:
        description: 'Environment'
        required: true
        type: choice
        options:
          - development
          - staging
          - production

トラブルシューティングコマンド

# キャッシュクリア
rm -rf ~/​Library/​Developer/​Xcode/​DerivedData
rm -rf .build

# Fastlaneログ確認
cat ~/​Library/​Logs/​fastlane/​fastlane.log

# GitHub Actions ログダウンロード
gh run view <run-id> --log

詳細ドキュメント

Guides(詳細ガイド)

🎯 完全ガイド(実践的・網羅的)

  1. GitHub Actions 完全ガイド - 基礎から高度な活用まで
  2. Fastlane 完全ガイド - iOS/​Android自動化の全て
  3. デプロイメント自動化 完全ガイド - 環境管理とデプロイ戦略
  4. パイプライン最適化ガイド - NEW! ビルド時間短縮・コスト削減

Checklists(チェックリスト)

構築時

運用時

Templates(テンプレート)

GitHub Actions ワークフロー

References(リファレンス)


学習リソース


関連Skills

  • git-workflow - ブランチ戦略との連携
  • testing-strategy - テスト自動実行
  • code-signing - 証明書管理
  • release-process - リリースフロー
  • app-store-submission - App Store申請

更新履歴

このSkill自体の変更履歴は CHANGELOG.md を参照

More skills from Gaku52

Rust Systems Programming logo
Gaku52/claude-code-skills

Rust Systems Programming

[日本語版](../../ja/02-programming/rust-systems-programming/SKILL.md)

6 0
View
Docker Container Guide logo
Gaku52/claude-code-skills

Docker Container Guide

[日本語版](../../ja/05-infrastructure/docker-container-guide/SKILL.md)

6 0
View
Security Fundamentals logo
Gaku52/claude-code-skills

Security Fundamentals

[日本語版](../../ja/06-data-and-security/security-fundamentals/SKILL.md)

6 0
View
Custom AI Agents logo
Gaku52/claude-code-skills

Custom AI Agents

[日本語版](../../ja/07-ai/custom-ai-agents/SKILL.md)

6 0
View
ios-security logo
Gaku52/claude-code-skills

ios-security

iOSセキュリティ実装ガイド。認証・認可、データ暗号化、Keychain、証明書ピンニング、App Transport Security、脱獄検知、難読化など、セキュアなiOSアプリケーション開発のベストプラクティス。

6 0
View
Clean Code Principles logo
Gaku52/claude-code-skills

Clean Code Principles

[日本語版](../../ja/03-software-design/clean-code-principles/SKILL.md)

6 0
View
lessons-learned logo
Gaku52/claude-code-skills

lessons-learned

インシデントから抽出された教訓・ベストプラクティスを体系的に管理し、チーム全体の知識として共有・活用するナレッジベース。継続的学習と品質向上の核となるSkill。

6 0
View
Operating System Guide logo
Gaku52/claude-code-skills

Operating System Guide

[日本語版](../../ja/01-cs-fundamentals/operating-system-guide/SKILL.md)

6 0
View
computer-science-fundamentals logo
Gaku52/claude-code-skills

computer-science-fundamentals

A comprehensive guide covering the fundamentals of computer science. From hardware internals and data representation to algorithms, data structures, computation theory, programming paradigms, and software engineering basics — a systematic guide to all the CS foundations every engineer needs.

6 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View