Local CI/CD using Fastlane
We can use fastlane to make automation build process and even deploy android app from local to firebase or google play console
Install Fastlane
First thing first instal fastlane for your specific OS. follow this instruction fastlane
After installation and you got fastlane command on your terminal. Next init your project with fastlane:
fastlane init
Then, after initialization, you will get fastlane folder within your android project.
Init Firebase CLI
Make sure Firebase-CLI is installed on your devices. Follow this instruction link After installation, init your android project with:
firebase init
Deploy android app to firebase app distribution
Follow this steps from build app to deploy to firebase app distribution:
- Open
AppFilein fastlane folder - Add script build app
gradle(task: 'bundle', build_type: options[:build_type])
- Add Script to deploy to app distribution
firebase_app_distribution(
app: `your_app_name`,
groups: `app_distribution_group`,
android_artifact_path: `aab_path`,
firebase_cli_token: `token`,
android_artifact_type: `build_variant`,
release_notes: `note_to_firebase_app_distribution`
)
That's All. Make local deployment faster using Fastlane.