Created
May 7, 2018 12:45
-
-
Save candostdagdeviren/340fd42bb3d03c915db22b71d9e093f9 to your computer and use it in GitHub Desktop.
iOS Fastfile Example for Flutter application Fastlane integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastlane_version "2.84.0" | |
xcversion(version: "9.2") | |
default_platform :ios | |
lane :certificates do | |
match( | |
app_identifier: ["com.jimdo.boost"], | |
type: "appstore", | |
readonly: true) | |
match( | |
app_identifier: ["com.jimdo.boost.debug"], | |
type: "development", | |
readonly: true) | |
match( | |
app_identifier: ["com.jimdo.boost.beta"], | |
type: "adhoc", | |
readonly: true) | |
end | |
lane :beta do | |
desc 'Push a new release to Fabric Beta' | |
setup_travis | |
match( | |
type: "adhoc", | |
app_identifier: "com.jimdo.boost.beta") | |
increment_build_number(build_number: ENV['TRAVIS_BUILD_NUMBER']) | |
# build iOS app | |
gym( | |
scheme: "Beta", | |
configuration: "Release-Beta", | |
export_method: "ad-hoc" | |
) | |
# upload to Beta by Crashlytics | |
crashlytics( | |
api_token: "CRASHLYTICS_API_TOKEN", | |
build_secret: "CRASHLYTICS_BUILD_SECRET", | |
notes_path: 'beta-change.log', | |
notifications: true, | |
groups: ['QA'], | |
) | |
slack( | |
message: 'Successfully distributed a new iOS Beta build!', | |
slack_url: 'SLACK_URL' | |
) | |
end | |
lane :release do | |
desc 'Push a new release to App Store' | |
keychain_name = "jimdo.boost.keychain_name" | |
create_keychain( | |
name: keychain_name, | |
password: ENV["MATCH_PASSWORD"], | |
default_keychain: true, | |
unlock: true, | |
timeout: 3600, | |
add_to_search_list: true | |
) | |
match( | |
keychain_name: keychain_name, | |
keychain_password: ENV["MATCH_PASSWORD"], | |
type: "appstore", | |
app_identifier: "com.jimdo.boost") | |
increment_build_number(build_number: ENV['TRAVIS_BUILD_NUMBER']) | |
# build iOS app | |
gym( | |
scheme: "Runner", | |
configuration: "Release", | |
export_method: "app-store" | |
) | |
# upload to App Store | |
deliver( | |
app_identifier: "com.jimdo.boost", | |
skip_screenshots: true, | |
skip_metadata: true, | |
automatic_release: false, | |
team_id: "APP_STORE_TEAM_ID" | |
) | |
# upload to Crashlytics | |
crashlytics( | |
api_token: "CRASHLYTICS_API_TOKEN", | |
build_secret: "CRASHLYTICS_BUILD_SECRET" | |
) | |
slack( | |
message: 'New iOS Release build successfully uploaded to App Store', | |
slack_url: 'SLACK_URL' | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@quynhnb2021 Fastlane was reading from the keychain if I remmeber correctly. It’s been 7 years :)