Fastfile 828 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
# Prevent Fastlane from overwriting README.md
skip_docs

default_platform(:android)

# This should be run after running
# flutter build apk --release
# to build the app using the Flutter toolchain.
platform :android do
10 11
  desc 'Push the built release APK to alpha or beta depending on current branch'
  lane :deploy_play_store do
12 13
    begin
      upload_to_play_store(
14
        track: 'alpha',
15 16 17 18 19 20 21 22 23
        apk: '../build/app/outputs/apk/release/app-release.apk',
        json_key_data: ENV['GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE'],
        skip_upload_screenshots: true,
        skip_upload_images: true
      )
    rescue => exception
      raise exception unless exception.message.include?('apkUpgradeVersionConflict')
      puts 'Current version already present on the Play Store. Omitting this upload.'
    end
24 25
  end
end