Skip to content

Instantly share code, notes, and snippets.

@rodydavis
Last active October 17, 2019 07:32
Show Gist options
  • Save rodydavis/2bcbe102ebf3385951e2fd1debc8f2bb to your computer and use it in GitHub Desktop.
Save rodydavis/2bcbe102ebf3385951e2fd1debc8f2bb to your computer and use it in GitHub Desktop.
Fastlane Flutter Fastfile
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:android)
platform :android do
desc "Prepare and archive app"
lane :prepare do |options|
#bundle_install
Dir.chdir "../.." do
sh("flutter", "packages", "get")
sh("flutter", "clean")
sh("flutter", "build", "appbundle", "--release")
end
end
desc "Push a new beta build to Google Play"
lane :beta do
prepare(release: false)
upload_to_play_store(
track: 'beta',
aab: "../build/app/outputs/bundle/release/app.aab"
)
add_git_tag(
grouping: "fastlane-builds",
prefix: "v",
build_number: android_get_version_code
)
push_to_git_remote
end
desc "Push a new release build to the Google Play"
lane :release do
prepare(release: true)
upload_to_play_store(
track: 'production',
aab: "../build/app/outputs/bundle/release/app.aab"
)
add_git_tag(
grouping: "release",
prefix: "v",
build_number: android_get_version_name
)
push_to_git_remote
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment