π One-command setup for Flutter CI/CD with GitHub Actions, Fastlane, and self-hosted runners
β
Copies all CI/CD files from a proven, production-ready setup
β
Generates custom setup guide with your app's specific configuration
β
No automatic modifications - you control every change
β
Safety checks to prevent data loss
β
Comprehensive instructions for Android, iOS, secrets, and deployment
- π± Complete CI/CD Pipeline: GitHub Actions workflow with quality checks, builds, and deployments
- π Fastlane Integration: iOS TestFlight and Android Play Store automation
- πͺ Smart Git Hooks: Automatic version conflict resolution
- π‘οΈ Security Controls: Deployment whitelist and commit prefix system
- π Detailed Instructions: Step-by-step guide customized for your app
- π§ Self-hosted Runner: Optimized for macOS build environments
# Install as GitHub CLI extension
gh extension install mbilalbenli/flutter-cicd-bootstrap
gh flutter-cicd init
npm install -g flutter-cicd-bootstrap
flutter-cicd-bootstrap init
git clone https://github.com/mbilalbenli/flutter-cicd-bootstrap.git
cd flutter-cicd-bootstrap
npm install
node bin/gh-flutter-cicd
cd your-flutter-project
gh flutter-cicd init
# Follow interactive prompts
# Read generated FLUTTER_CICD_SETUP.md
# Configure Android/iOS as instructed
# Set up GitHub secrets
# Test with: git commit -m "deploy: test setup"
.github/workflows/mobile-ci.yml
- Main CI/CD pipeline.github/actions/setup-flutter/
- Flutter setup action.github/actions/setup-ruby-fastlane/
- Ruby/Fastlane setup action
fastlane/Fastfile
- Build and deployment lanesfastlane/Appfile
- App identifiers and credentialsfastlane/Matchfile
- iOS certificate management
.githooks/pre-commit
- Version conflict prevention
android/key.properties.example
- Android signing template
FLUTTER_CICD_SETUP.md
- Your custom setup guide
- β Pre-flight checks - Validates Flutter project and git status
- β Conflict detection - Warns about files that will be overwritten
- β No modifications - Only copies files, never modifies existing code
- β Validation - Checks bundle ID format and required inputs
- β Comprehensive warnings - Alerts about uncommitted changes and conflicts
Commit Prefix | Behavior |
---|---|
deploy: message |
Force deploy from any branch (if whitelisted) |
nodeploy: message |
Skip all CI/CD workflows |
v1.2.3: message |
Set specific version and deploy |
[skip ci] |
Skip CI/CD (standard GitHub convention) |
- Automatic versioning on main/dev branches
- Version conflict prevention with git hooks
- Manual version override with commit prefixes
- Build number formula:
major*100 + minor*10 + patch
- iOS: Xcode builds β TestFlight deployment
- Android: Gradle builds β Play Store deployment
- Environment-based: Different secrets per branch
- Quality gates: Formatting, analysis, tests (configurable)
- Flutter SDK β₯3.32.8
- Git with repository access
- GitHub CLI (optional, for easier secrets management)
- macOS (required for iOS builds)
- Xcode (for iOS)
- Android SDK (for Android)
- Ruby β₯3.0 + Bundler + Fastlane
- Flutter SDK configured
- GitHub repository with Actions enabled
- Apple Developer Account (for iOS)
- Google Play Console (for Android)
- Certificate repository (private Git repo for iOS certificates)
After running the tool, you'll get a comprehensive FLUTTER_CICD_SETUP.md
with:
- Your specific configuration (bundle ID, app name, etc.)
- Android setup steps (Gradle, manifest, package structure)
- iOS setup steps (Xcode, Info.plist, Fastlane)
- GitHub secrets configuration (with exact secret names)
- Self-hosted runner verification
- Testing instructions
- Troubleshooting guide
$ gh flutter-cicd init
π Flutter CI/CD Bootstrap
? App name (displayed to users): My Awesome App
? Bundle ID (com.company.app): com.mycompany.awesomeapp
? GitHub repository (username/repo): myuser/awesome-app
? Main branch name: main
? Development branch name: dev
? Self-hosted runner labels: self-hosted,macOS,awesome-runner
? Include Android configuration? Yes
? Include iOS configuration? Yes
π Configuration Summary:
App Name: My Awesome App
Bundle ID: com.mycompany.awesomeapp
GitHub Repo: myuser/awesome-app
Branches: main / dev
Runner Labels: self-hosted,macOS,awesome-runner
Android: β
iOS: β
? Proceed with file copying? Yes
π Copying CI/CD files...
π Copying GitHub Actions workflow...
π Copying GitHub Actions...
π± Copying Fastlane configuration...
πͺ Copying git hooks...
π€ Copying Android templates...
π Generating your custom setup guide...
π Generated: FLUTTER_CICD_SETUP.md
π Setup completed successfully!
π Next steps:
1. Read your custom setup guide: FLUTTER_CICD_SETUP.md
2. Review all copied files before committing
3. Follow the Android/iOS configuration steps
4. Set up GitHub secrets and variables
5. Test your first deployment with: git commit -m "deploy: test setup"
β οΈ Important: Review all files before committing to git!
"Not a Flutter project"
- Ensure you're in a directory with
pubspec.yaml
- Run
flutter create .
if needed
"Files will be overwritten"
- Review the warning list
- Backup important files manually
- The tool shows exactly which files will be affected
"Flutter CLI not found"
- Install Flutter: https://docs.flutter.dev/get-started/install
- Ensure Flutter is in your PATH
"GitHub CLI not found"
- Install GitHub CLI: https://cli.github.com/
- Or set up secrets manually as shown in generated guide
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m "Add amazing feature"
- Push branch:
git push origin feature/amazing-feature
- Open Pull Request
MIT License - see LICENSE file for details
Based on production CI/CD setup from giderx - a Flutter expense tracking app with automated deployment to iOS TestFlight and Android Play Store.
Made with β€οΈ for the Flutter community