本文へ移動
cccskills
無料GitHub で公開

configuring-codemagic

Configures Codemagic CI/CD pipelines for Flutter using `codemagic.yaml`. Use when setting up automated Flutter builds on Codemagic, configuring iOS code signing without Fastlane Match, deploying to App Store Connect or Google Play from Codemagic, caching pub dependencies in Codemagic, setting up encrypted environment variable groups, running tests with Codemagic's test dashboard, or choosing between Codemagic and GitHub Actions + Fastlane for a Flutter CI/CD pipeline.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Flutter combined with Codemagic Best Practices (YAML approach)

Goal

Implements Codemagic YAML configurations for Flutter deployment. Codemagic natively understands Flutter, requires no extra tooling for code signing, and provides Apple M-series machines for fast iOS compilation.

Instructions

The recommended approach is using codemagic.yaml for "Infrastructure as Code," maintaining it within the project repository alongside the source code.

1. Infrastructure and Cache Strategy

Place codemagic.yaml in the project root. A single file can contain multiple Workflows (e.g., executing iOS deployments and Android deployments separately).

Best Caching Practice: Caching is fundamental to saving CI costs. Be sure to cache Dart dependencies and native build tools.

# 🌟 codemagic.yaml
workflows:
  android-release:
    name: Android Release Workflow
    instance_type: mac_mini_m1 # Specify M1 machine for acceleration
    environment:
      # 🌟 Specify the Flutter version
      flutter: stable 
    cache:
      cache_paths:
        - $HOME/.pub-cache # Dart packages
        - $HOME/.gradle/caches # Gradle dependencies

2. Environment Variables & Encrypted Keys

NEVER hardcode Keystore passwords or API Keys in the YAML file. Codemagic provides highly secure UI dashboards to create variable groups, encrypt them, and consume them via scripts.

    environment:
      flutter: stable
      groups:
        # Pre-configured group names on the Codemagic UI
        - keystore_credentials # Contains $KEY_PASSWORD, $ALIAS_PASSWORD
        - google_play_credentials # Contains the JSON key path for the Google Service Account

3. Analyze, Generate & Test

Before building, utilize the scripts block to execute commands sequentially.

    scripts:
      - name: ⬇️ Fetch Dependencies
        script: flutter packages pub get
        
      - name: ⚙️ Code Generation (build_runner)
        script: dart run build_runner build --delete-conflicting-outputs
        
      - name: 🚨 Static Analysis
        script: flutter analyze
        
      - name: 🧪 Unit & Widget Tests
        script: flutter test
        # 🌟 Codemagic automatically parses the test results and displays them on a sleek Web Dashboard
        test_report: build/test-results/flutter.json 

4. Build Bundle / IPA

Codemagic's greatest strength lies in condensing complex Code Signing flows into extremely minimalist declarative syntax.

4.1 Android Building (with Keystore)

      - name: 🔨 Build Android App Bundle
        script: |
          # Generate a key.properties for android/app/build.gradle to read
          echo "storePassword=$KEYSTORE_PASSWORD" >> android/key.properties
          echo "keyPassword=$KEY_PASSWORD" >> android/key.properties
          echo "keyAlias=$KEY_ALIAS" >> android/key.properties
          echo "storeFile=$KEYSTORE_PATH" >> android/key.properties
          
          # 🌟 The build action
          flutter build appbundle --release

4.2 iOS Code Signing

You typically do not need to manually configure Fastlane Match. Upload your App Store Connect API Key via Codemagic's Web Dashboard, and it automatically handles certificate fetching:

    environment: # Declare before Workflow logic: Enable Auto Signing
      ios_signing:
        distribution_type: app_store
        bundle_identifier: com.yourcompany.app

    scripts:
      - name: 🍏 Build iOS IPA
        script: flutter build ipa --release

5. Push to Store (Publishing)

Once the build concludes, declare the target artifacts, and automatically push directly to the stores utilizing built-in modules—no upload scripting required!

    artifacts:
      - build/app/outputs/bundle/release/**/*.aab
      - build/ios/ipa/*.ipa

    publishing:
      # Auto-email the team
      email:
        recipients:
          - devteam@company.com
          
      # 🌟 Publish to Google Play (Internal Track)
      google_play:
        credentials: $GCP_SERVICE_ACCOUNT_CREDENTIALS # The JSON key variable
        track: internal
        
      # 🌟 Publish to App Store Connect / TestFlight
      app_store_connect:
        auth: integration # Corresponds to the integrated Apple account from the Dashboard
        submit_to_testflight: true

Constraints

  • Prefer codemagic.yaml over the Codemagic UI workflow editor — keeping pipeline configuration in the repository alongside source code is the recommended "Infrastructure as Code" approach.
  • For teams already using Fastlane, Codemagic can still call bundle exec fastlane <lane> from its scripts block; the two tools are not mutually exclusive.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Declarative animation patterns using flutter_animate v4.5.x with composable effects (fade, scale, slide, shimmer, shake, blur), GLSL fragment shaders, and scroll-synchronized animations. Use this skill for adding UI animations and transitions, building staggered or sequenced effects, creating custom animation effects, fixing animation jank or performance issues, implementing shimmer loading states, or adding scroll-driven animations. Supports delays, curves, adaptive effects, and easy extension method chaining (.animate()).

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

Dart 3 modern features (through 3.10) and Effective Dart best practices including records, patterns, sealed classes, dot shorthands, null-aware collection elements, and wildcard variables. Use when adopting Dart 3.7+ syntax, using dot shorthands for enums or static members, using null-aware elements in lists or maps, using wildcard _ parameters, improving code quality, or reviewing Dart code conventions.

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

Expert-level guidance for Flutter production applications: architecture decisions (Clean/Layered/Hexagonal/Feature-First), advanced state management (BLoC/Riverpod/GetX), performance optimization (eliminating jank, memory profiling, reducing rebuild overhead), code review with design pattern enforcement, scalability assessments, native platform integration (MethodChannel/EventChannel/FFI), complex UI challenges (custom render objects, slivers), testing strategies (unit/widget/integration/golden), CI/CD pipeline architecture, build optimization, and accessibility compliance. Triggers: 'architecture decision', 'design pattern', 'performance issue', 'code review', 'production problem', 'scaling concerns', 'best practices', 'technical debt', 'refactoring strategy'. Essential for complex enterprise apps, critical production debugging, architectural refactors, or when choosing between competing technical approaches.

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

Builds SEO-friendly web applications with Dart using the Jaspr framework. Use when creating Dart-based websites, blogs, or landing pages requiring semantic HTML output; implementing server-side rendering (SSR) or static site generation (SSG); adding Tailwind CSS via jaspr_tailwind; routing with jaspr_router; testing components with jaspr_test; or building full-stack Dart web apps where Flutter Web's canvas rendering is unsuitable.

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

shadcn_flutter UI component library for building accessible, themed Flutter interfaces. Use when integrating shadcn components, configuring design system theming, or building consistent widget layouts.

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

Configures deep linking in Flutter using Android App Links (assetlinks.json) and iOS Universal Links (apple-app-site-association) integrated with GoRouter v17.x navigation. Use this skill when setting up HTTPS domain association, handling magic links or email verification links, routing marketing campaign URLs (Google Ads, Facebook Ads) into the app, implementing password reset or invite flows via deep links, fixing deep link verification failures, troubleshooting GoRouter deep link integration, or any time the words 'deep link', 'universal link', 'app link', 'assetlinks', 'AASA', 'magic link', or 'deeplinking' appear in the request. Avoids deprecated custom URL schemes (myapp://).

日本語の概要は準備中です。原文の説明を表示しています。

Poorgramer-Zack/dart-expert-skills72026年8月11日 更新

Poorgramer-Zack のスキルをすべて見る

このスキルの問題を報告する