Skip to content

Instantly share code, notes, and snippets.

@adesamp
Last active November 27, 2021 23:42
Show Gist options
  • Save adesamp/9b6017ece733aeddbf1b38ae0b67e097 to your computer and use it in GitHub Desktop.
Save adesamp/9b6017ece733aeddbf1b38ae0b67e097 to your computer and use it in GitHub Desktop.
for internal
# 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
download_url = ""
before_all do
ENV["SLACK_URL"] = "your slack channel hook url"
end
desc "Deploy latest version to Google Play"
lane :deploy do |options|
gradle(task: "clean")
gradle(
task: "bundle",
build_type: options[:variant],
properties: {
"android.injected.signing.store.file" => options[:pathKS],
"android.injected.signing.store.password" => options[:storePassword],
"android.injected.signing.key.alias" => options[:alias],
"android.injected.signing.key.password" => options[:keyPassword],
}
)
upload_to_play_store
end
lane :internal do
gradle(task: "assembleRelease")
download_url = upload_to_play_store_internal_app_sharing(apk: lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH])
end
after_all do |lane|
slack(message: "Successfull deployed in this URL <"+ download_url + ">")
end
error do |lane, exception|
slack(
message: exception.message,
success: false
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment