From app-gtm-release
Set up CI/CD pipelines for Flutter app builds and releases using Codemagic (priority) or GitHub Actions. Use this skill when the user asks about Flutter CI/CD, automated builds, Codemagic setup, GitHub Actions for Flutter, code signing automation, build pipelines, or deploying Flutter apps through CI. Also triggers on: 'automate my builds', 'set up continuous integration', 'pipeline for Flutter', 'codemagic.yaml', 'workflow for Flutter', or any mention of automating Flutter app distribution.
How this skill is triggered — by the user, by Claude, or both
Slash command
/app-gtm-release:cicd-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill configures automated build, test, and deployment pipelines for Flutter mobile apps. It produces three workflows that cover the full release lifecycle.
This skill configures automated build, test, and deployment pipelines for Flutter mobile apps. It produces three workflows that cover the full release lifecycle.
Every Flutter CI/CD setup needs these three workflows, regardless of platform:
GitHub Actions + Custom Runners (recommended when you already have CI/CD infra):
references/github-actions.md for complete workflow filessubosito/flutter-action@v2 — works on any Ubuntu runnerGitHub Actions + GitHub-hosted runners (starting from scratch, budget-conscious):
references/github-actions.md for complete workflow filesCodemagic (recommended for iOS releases or teams without CI/CD):
references/codemagic.md for the complete codemagic.yaml configurationBoth platforms share the same logical architecture. The differences are in YAML syntax and platform-specific features.
Pipelines detect the target environment from the branch name:
| Branch | Environment | Distribution | Signing | Obfuscation |
|---|---|---|---|---|
develop | dev | Firebase App Distribution | Debug or unsigned | No |
staging | staging | Firebase App Distribution / TestFlight | Release signed | No |
production | production | Google Play / App Store | Release signed | Yes |
Never commit secrets to the repository. Use template-based injection:
Template file (committed): lib/core/env/env_ci.dart
class EnvConfig {
static const String baseUrl = '<<BASE_URL>>';
static const String apiKey = '<<API_KEY>>';
static const String environment = '<<ENV_NAME>>';
}
Generator script (committed): scripts/generate_config.sh
#!/usr/bin/env bash
set -euo pipefail
ENV_NAME=${1:?Usage: $0 <env> <base-url> <api-key>}
BASE_URL=${2:?}
API_KEY=${3:?}
TEMPLATE="lib/core/env/env_ci.dart"
OUT="lib/core/env/env_ci.g.dart"
sed -e "s|<<BASE_URL>>|$BASE_URL|g" \
-e "s|<<API_KEY>>|$API_KEY|g" \
-e "s|<<ENV_NAME>>|$ENV_NAME|g" \
"$TEMPLATE" > "$OUT"
echo "Config generated for $ENV_NAME"
Generated file (in .gitignore): lib/core/env/env_ci.g.dart
Reusable across both CI platforms: scripts/quality_checks.sh
#!/usr/bin/env bash
set -euo pipefail
echo "=== Formatting ==="
dart format --output=none --set-exit-if-changed .
echo "=== Static analysis ==="
flutter analyze --fatal-infos
echo "=== Tests ==="
flutter test --no-pub --coverage
echo "=== Coverage threshold ==="
THRESHOLD=${COVERAGE_THRESHOLD:-70}
if command -v lcov >/dev/null 2>&1; then
COVERAGE=$(lcov --summary coverage/lcov.info 2>&1 | grep 'lines' | awk '{print $2}' | sed 's/%//')
if [ "$(echo "$COVERAGE < $THRESHOLD" | bc)" -eq 1 ]; then
echo "Coverage $COVERAGE% is below threshold $THRESHOLD%"
exit 1
fi
echo "Coverage: $COVERAGE% (threshold: $THRESHOLD%)"
fi
For production builds with obfuscation: scripts/upload_symbols.sh
#!/usr/bin/env bash
set -euo pipefail
RELEASE=${1:?Usage: $0 <release-id>}
if ! command -v sentry-cli >/dev/null 2>&1; then
echo "sentry-cli not found, skipping symbol upload"
exit 0
fi
sentry-cli releases new "$RELEASE" || true
sentry-cli upload-dif build/symbols || true
sentry-cli releases finalize "$RELEASE" || true
echo "Symbols uploaded for $RELEASE"
Dev builds:
flutter build appbundle --release # Android
flutter build ios --release --no-codesign # iOS
Staging builds:
flutter build appbundle --release # Android (signed via key.properties)
flutter build ipa --release # iOS (signed via profile)
Production builds:
flutter build appbundle --release \
--obfuscate \
--split-debug-info=build/symbols # Android
flutter build ipa --release \
--obfuscate \
--split-debug-info=build/symbols # iOS
| Environment | Android | iOS |
|---|---|---|
| Dev | Firebase App Distribution | TestFlight (internal) or none |
| Staging | Firebase App Distribution | TestFlight (external) |
| Production | Google Play Store | App Store Connect |
Organize secrets into logical groups in your CI platform:
Signing:
ANDROID_KEYSTORE_BASE64 — base64-encoded .jks fileKEYSTORE_PASSWORD — keystore passwordKEY_ALIAS — key alias nameKEY_PASSWORD — key passwordIOS_CERTIFICATE_BASE64 — base64-encoded .p12 distribution certificateIOS_CERTIFICATE_PASSWORD — certificate passwordIOS_PROVISIONING_PROFILE_BASE64 — base64-encoded .mobileprovisionDistribution:
FIREBASE_TOKEN — from firebase login:ciFIREBASE_ANDROID_APP_ID — Firebase console app IDFIREBASE_IOS_APP_ID — Firebase console app IDFIREBASE_GROUPS — comma-separated tester group namesGOOGLE_PLAY_SERVICE_ACCOUNT_JSON — Play Console service accountAPP_STORE_CONNECT_API_KEY_ID — App Store Connect key IDAPP_STORE_CONNECT_API_ISSUER_ID — issuer IDAPP_STORE_CONNECT_API_KEY_CONTENT — .p8 key contentEnvironment:
STAGING_BASE_URL, STAGING_API_KEYPROD_BASE_URL, PROD_API_KEYMonitoring:
SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECTAfter understanding the architecture above, read the reference file for the chosen platform:
references/codemagic.md — complete codemagic.yaml with all three workflowsreferences/github-actions.md — complete .github/workflows/*.yml filesBoth references produce the same outcome: signed artifacts distributed to the right channel per environment.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub dojocodinglabs/app-gtm-release-toolkit --plugin app-gtm-release