| name | Fastlane/Mobile CI-CD |
| description | Automated mobile build, test, and deployment with Fastlane |
| version | 1.0.0 |
| category | Mobile DevOps |
| slug | fastlane-cicd |
| status | active |
| graph | {"domains":["domain:mobile"],"specializations":["specialization:mobile-development"],"skillAreas":["skill-area:app-store-deployment","skill-area:deployment-infrastructure-management"],"roles":["role:mobile-engineer"],"workflows":["workflow:feature-development","workflow:release-management"],"topics":["topic:accessibility"]} |
Fastlane/Mobile CI-CD Skill
Overview
This skill provides comprehensive capabilities for mobile CI/CD automation using Fastlane. It enables automated builds, testing, code signing, beta distribution, and app store deployments for both iOS and Android platforms.
Allowed Tools
bash - Execute Fastlane commands, Ruby, and bundler
read - Analyze Fastfile, Appfile, and configuration files
write - Generate Fastlane configurations and lanes
edit - Update existing Fastlane configurations
glob - Search for Fastlane and CI configuration files
grep - Search for patterns in CI/CD configurations
Capabilities
Fastlane Configuration
-
Fastfile Setup
- Create platform-specific lanes
- Configure before_all and after_all hooks
- Implement error handling with error blocks
- Set up environment variables
- Configure lane options and parameters
-
Appfile Configuration
- Configure app identifiers
- Set up Apple ID and team settings
- Configure Google Play credentials
- Set environment-specific values
iOS Code Signing
-
Match (Code Signing)
- Configure Git-based certificate storage
- Set up development, adhoc, and appstore profiles
- Implement automatic certificate renewal
- Handle multiple team configurations
- Configure readonly mode for CI
-
Manual Code Signing
- Import certificates with cert action
- Generate provisioning profiles with sigh
- Configure entitlements
- Handle enterprise distribution
Build Automation
-
iOS Builds
- Configure gym for archive creation
- Set up build configurations
- Handle bitcode settings
- Configure export options
- Implement build number automation
-
Android Builds
- Configure gradle action
- Build APK and AAB files
- Handle signing configurations
- Configure build variants
- Implement version code automation
Testing
-
Test Automation
- Run scan for iOS testing
- Configure test schemes and destinations
- Handle test parallelization
- Generate test reports
- Implement retry logic
-
Android Testing
- Run gradle test tasks
- Configure instrumented tests
- Integrate with Firebase Test Lab
- Generate coverage reports
Beta Distribution
-
TestFlight
- Configure pilot for TestFlight uploads
- Manage test groups
- Handle changelog updates
- Configure external testing
- Implement waiting for processing
-
Firebase App Distribution
- Configure firebase_app_distribution
- Manage tester groups
- Handle release notes
- Configure Android and iOS distribution
App Store Deployment
-
App Store Connect
- Configure deliver for metadata
- Upload screenshots with snapshot
- Submit for review
- Handle phased releases
- Manage app versions
-
Google Play Store
- Configure supply for Play Store
- Manage release tracks
- Upload AAB files
- Handle staged rollouts
- Configure in-app updates
CI Integration
-
GitHub Actions
- Configure workflow files
- Set up secrets management
- Implement caching strategies
- Configure matrix builds
- Handle artifacts
-
Other CI Platforms
- Bitrise integration
- CircleCI configuration
- Jenkins pipeline setup
- Azure DevOps integration
Target Processes
This skill integrates with the following processes:
mobile-cicd-fastlane.js - CI/CD pipeline setup
automated-release-management.js - Release automation
ios-appstore-submission.js - iOS deployment
android-playstore-publishing.js - Android deployment
beta-testing-setup.js - Beta distribution
Dependencies
Required
- Ruby 3.0+
- Bundler
- Fastlane
- Xcode (for iOS)
- Android SDK (for Android)
Optional
- Firebase CLI
- GitHub CLI
- AWS CLI (for S3 storage)
Configuration
Project Structure
project-root/
โโโ fastlane/
โ โโโ Fastfile
โ โโโ Appfile
โ โโโ Matchfile
โ โโโ Pluginfile
โ โโโ Gymfile
โ โโโ Scanfile
โ โโโ Deliverfile
โ โโโ metadata/
โ โ โโโ en-US/
โ โ โ โโโ description.txt
โ โ โ โโโ keywords.txt
โ โ โ โโโ release_notes.txt
โ โ โโโ review_information/
โ โโโ screenshots/
โโโ Gemfile
โโโ Gemfile.lock
Gemfile
source "https://rubygems.org"
gem "fastlane"
gem "cocoapods"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
Usage Examples
Basic Fastfile
default_platform(:ios)
before_all do
ensure_git_status_clean
git_pull
end
platform :ios do
desc "Run tests"
lane :test do
scan(
scheme: "MyApp",
devices: ["iPhone 15 Pro"],
code_coverage: true,
output_directory: "./fastlane/test_output"
)
end
desc "Build and upload to TestFlight"
lane :beta do
increment_build_number(xcodeproj: "MyApp.xcodeproj")
match(type: "appstore", readonly: true)
gym(
scheme: "MyApp",
export_method: "app-store",
output_directory: "./build"
)
pilot(
skip_waiting_for_build_processing: true,
changelog: "Bug fixes and improvements"
)
commit_version_bump(
message: "Bump build number [skip ci]",
xcodeproj: "MyApp.xcodeproj"
)
push_to_git_remote
end
desc "Deploy to App Store"
lane :release do
capture_screenshots
increment_version_number(bump_type: "patch")
increment_build_number
match( , )
gym( , )
deliver(
,
,
,
)
error ||
slack(
,
)
platform
desc
lane
gradle( )
desc
lane
gradle(
,
)
firebase_app_distribution(
[],
,
)
desc
lane
gradle(
,
)
supply(
,
,
,
,
)
Matchfile
git_url("git@github.com:organization/certificates.git")
storage_mode("git")
type("appstore")
app_identifier(["com.example.myapp", "com.example.myapp.widget"])
username("developer@example.com")
readonly(is_ci)
platform("ios")
Appfile
app_identifier("com.example.myapp")
apple_id("developer@example.com")
team_id("XXXXXXXXXX")
itc_team_id("XXXXXXXXXX")
json_key_file("./fastlane/play-store-key.json")
package_name("com.example.myapp")
for_platform :ios do
for_lane :beta do
app_identifier("com.example.myapp.beta")
end
end
GitHub Actions Workflow
name: iOS Deploy
on:
push:
branches: [main]
tags: ['v*']
jobs:
deploy:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Set up certificates
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTH }}
run: bundle exec fastlane match
Android GitHub Actions
name: Android Deploy
on:
push:
branches: [main]
tags: ['v*']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Decode keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > app/release.keystore
- name: Create key.properties
Quality Gates
Build Verification
- All tests pass before deployment
- Code coverage meets threshold
- No compiler warnings
- Static analysis passes
Release Criteria
- Version number incremented
- Changelog updated
- Screenshots current
- Metadata complete
Security
- Certificates stored securely
- Secrets not in repository
- API keys rotated regularly
Related Skills
app-store-connect - App Store management
google-play-console - Play Store management
mobile-testing - Test automation
Version History
- 1.0.0 - Initial release with Fastlane 2.x support