Mobile ci cd

From tinh2/skills-hub-registry · View interactive version

Mobile ci cd is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Set up mobile CI/CD pipelines for Flutter, React Native, or native iOS/Android — GitHub Actions workflows for testing, code signing, TestFlight/Play Store distribution, build number management, Fastlane integration, and artifact retention

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Do NOT pause for confirmation.

Execute every phase below in sequence, making decisions based on what you find.

============================================================

PHASE 0 — INPUT

============================================================

$ARGUMENTS may contain:

============================================================

PHASE 1 — PROJECT DETECTION

============================================================

  1. Detect the mobile framework:
  1. Detect existing CI/CD:
  1. Detect existing Fastlane:
  1. Detect signing configuration:

============================================================

PHASE 2 — iOS PIPELINE

============================================================

Generate .github/workflows/ios.yml:

Triggers: Push to main/develop, PRs to main/develop. Use concurrency groups with cancel-in-progress: true.

Test job (runs on macos-14):

TestFlight job (runs on push to develop):

App Store job (runs on tag v*.*.*):

============================================================

PHASE 3 — ANDROID PIPELINE

============================================================

Generate .github/workflows/android.yml:

Triggers: Same as iOS. Concurrency groups.

Test job (runs on ubuntu-latest):

Internal Track job (runs on push to develop):

Production job (runs on tag v*.*.*):

============================================================

PHASE 4 — BUILD NUMBER MANAGEMENT

============================================================

Configure a build number strategy that guarantees monotonically increasing values:

Recommended: CI run number (${{ github.run_number }}) — simple and monotonic.

Alternative A: Git commit count (git rev-list --count HEAD) — tied to commit history.

Alternative B: Timestamp (date +%Y%m%d%H%M) — works for infrequent builds.

Inject build number per framework:

============================================================

PHASE 5 — CODE SIGNING IN CI

============================================================

iOS Signing:

Android Signing:

Generate a signing setup checklist documenting every secret, where to obtain it, and how to encode it.

============================================================

PHASE 6 — AUTOMATED TESTING

============================================================

Configure comprehensive test jobs:

Unit tests: Flutter flutter test --coverage, iOS xcodebuild test, Android ./gradlew test

Static analysis: Flutter flutter analyze, iOS SwiftLint, Android ./gradlew lint

Coverage: Upload to Codecov or Coveralls. Set minimum coverage thresholds.

Optional UI tests:

============================================================

PHASE 7 — ARTIFACT MANAGEMENT

============================================================

Configure artifact retention:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After completing deployment/infrastructure changes, validate:

  1. Verify all generated files are syntactically valid (YAML, JSON, HCL, Dockerfile).
  2. Run validation commands if available (terraform validate, docker build --check, kubectl dry-run).
  3. Verify no secrets, credentials, or sensitive values are hardcoded.
  4. If validation fails, diagnose and fix the specific syntax or config error.
  5. Repeat up to 2 iterations.

IF STILL FAILING after 2 iterations:

============================================================

OUTPUT

============================================================

## Mobile CI/CD Pipeline Complete

### Platform: {GitHub Actions / Bitrise / Codemagic}
### Framework: {Flutter / iOS Native / Android Native / React Native}

### Pipeline Overview
| Trigger | iOS Action | Android Action |
|---------|------------|----------------|
| PR | Test + analyze | Test + lint |
| Push to develop | Test + TestFlight | Test + Internal Track |
| Tag v*.*.* | Test + App Store | Test + Production (10%) |

### Required Secrets
| Secret | Platform | How to Obtain |
|--------|----------|---------------|
| MATCH_PASSWORD | iOS | Chosen during match init |
| MATCH_GIT_TOKEN | iOS | GitHub PAT with repo scope |
| ASC_KEY_ID | iOS | App Store Connect > Keys |
| ASC_ISSUER_ID | iOS | App Store Connect > Keys |
| ASC_KEY_CONTENT | iOS | .p8 file contents |
| KEYSTORE_BASE64 | Android | base64 -w0 upload-keystore.jks |
| KEYSTORE_PASSWORD | Android | Chosen during keytool |
| KEY_ALIAS | Android | Chosen during keytool |
| KEY_PASSWORD | Android | Chosen during keytool |
| PLAY_STORE_JSON_KEY | Android | GCP service account JSON |

### Files Created
{list all generated workflow and configuration files}

============================================================

NEXT STEPS

============================================================

  1. Configure the required secrets in your GitHub repository settings
  2. Run deploy/play-store-publish to set up Fastlane lanes for Play Store
  3. Run deploy/app-store-publish to set up Fastlane lanes for App Store
  4. Run deploy/ota-updates to configure over-the-air update infrastructure

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /mobile-ci-cd — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

============================================================

DO NOT

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.