diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1f53a0b..3e796fb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -181,10 +181,19 @@ desc "Submit a new build to Firebase App Distribution" lane :beta_firebase do |options| # Like for alpha and beta, this lane requires the apk to be already available - firebase_app_distribution( - app: "1:79978046456:android:ec6742f538f9269b", - apk_path: "app/build/outputs/apk/#{getFlavorName(options)}/release/app-#{getFlavorName(options)}-release.apk", - ) + firebase_api_token = ENV['FIREBASE_API_TOKEN'] + if ! firebase_api_token + UI.user_error!("No Firebase API token found in environment (FIREBASE_API_TOKEN)") + else + find_firebase_app_id( + app_identifier: get_application_id(getFlavorName(options)), + ) + firebase_app_distribution( + app: lane_context[SharedValues::GOOGLE_APP_ID], + apk_path: "app/build/outputs/apk/#{getFlavorName(options)}/release/app-#{getFlavorName(options)}-release.apk", + firebase_cli_token: firebase_api_token + ) + end end desc "Deploy a new version to the Google Play"