Skip to content

Commit

Permalink
Add Fastlane lanes for Play Store deployment and Firebase App Distrib…
Browse files Browse the repository at this point in the history
…ution
  • Loading branch information
Mozart299 committed Dec 13, 2024
1 parent 28c447a commit 98d32f9
Showing 1 changed file with 35 additions and 30 deletions.
65 changes: 35 additions & 30 deletions mobile-v3/android/fastlane/Fastfile
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

0 comments on commit 98d32f9

Please sign in to comment.