-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Fastlane lanes for Play Store deployment and Firebase App Distrib…
…ution
- Loading branch information
Showing
1 changed file
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
# This file contains the fastlane.tools configuration | ||
# You can find the documentation at https://docs.fastlane.tools | ||
# | ||
# For a list of all available actions, check out | ||
# | ||
# https://docs.fastlane.tools/actions | ||
# | ||
# For a list of all available plugins, check out | ||
# | ||
# https://docs.fastlane.tools/plugins/available-plugins | ||
# | ||
|
||
# Uncomment the line if you want fastlane to automatically update itself | ||
# update_fastlane | ||
|
||
default_platform(:android) | ||
|
||
platform :android do | ||
desc "Runs all the tests" | ||
lane :test do | ||
gradle(task: "test") | ||
end | ||
|
||
desc "Submit a new Beta Build to Crashlytics Beta" | ||
lane :beta do | ||
gradle(task: "clean assembleRelease") | ||
crashlytics | ||
|
||
# sh "your_script.sh" | ||
# You can also use other beta testing services here | ||
desc "Deploy a new version to play store" | ||
lane :play_store do | ||
update_fastlane | ||
sh "bundle exec fastlane update_plugins" | ||
_google_play_track_version_codes = google_play_track_version_codes( | ||
package_name: 'com.airqo.app', | ||
track: 'production', | ||
json_key_data: ENV['MOBILE_ANDROID_PLAYSTORE_SA'] | ||
) | ||
_previous_build_number = _google_play_track_version_codes[0] | ||
_new_build_number = _previous_build_number + 1 | ||
sh "flutter build appbundle --build-number #{_new_build_number} --flavor airqo" | ||
upload_to_play_store( | ||
release_status: "completed", | ||
json_key_data: ENV['MOBILE_ANDROID_PLAYSTORE_SA'], | ||
package_name:"com.airqo.app", | ||
aab: "../build/app/outputs/bundle/airqoRelease/app-airqo-release.aab", | ||
skip_upload_metadata: true, | ||
skip_upload_images: true, | ||
skip_upload_screenshots: true, | ||
) | ||
end | ||
|
||
desc "Deploy a new version to the Google Play" | ||
lane :deploy do | ||
gradle(task: "clean assembleRelease") | ||
upload_to_play_store | ||
desc "Deploy to new version to Firebase App Distribution" | ||
lane :app_distribution do | ||
update_fastlane | ||
sh "bundle exec fastlane update_plugins" | ||
sh "flutter build appbundle --flavor airqo" | ||
firebase_app_distribution( | ||
app: ENV['MOBILE_ANDROID_ID_FIREBASE'], | ||
android_artifact_path:"../build/app/outputs/bundle/airqoRelease/app-airqo-release.aab", | ||
release_notes_file: "fastlane/release_notes.txt", | ||
service_credentials_file: "fastlane/firebase-app-distribution.json", | ||
android_artifact_type: "AAB", | ||
groups: "airqo-team", | ||
) | ||
end | ||
end | ||
end |