2022-08-02 05:00:50 -04:00
|
|
|
# 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(:ios)
|
|
|
|
|
|
|
|
|
|
platform :ios do
|
2022-08-04 23:47:08 -04:00
|
|
|
desc 'Push a new release build to the App Store'
|
2026-06-08 23:15:38 -07:00
|
|
|
lane :release do |options|
|
|
|
|
|
dry_run = options[:dry_run] || false
|
|
|
|
|
|
2022-08-04 23:47:08 -04:00
|
|
|
# Setup for CI. Uses a keychain to prevent the CI from hanging due to password prompts.
|
|
|
|
|
setup_ci
|
2022-08-02 05:00:50 -04:00
|
|
|
|
2022-08-04 23:47:08 -04:00
|
|
|
# Obtain credentials from App Store Connect API. Will be automatically used for the rest of the lane.
|
2022-08-02 05:00:50 -04:00
|
|
|
app_store_connect_api_key(
|
2022-08-04 23:47:08 -04:00
|
|
|
key_id: ENV['APP_STORE_KEY_ID'],
|
|
|
|
|
issuer_id: ENV['APP_STORE_ISSUER_ID'],
|
|
|
|
|
key_content: ENV['APP_STORE_CREDENTIALS'],
|
2022-08-07 22:01:09 -04:00
|
|
|
is_key_content_base64: true
|
2022-08-02 05:00:50 -04:00
|
|
|
)
|
|
|
|
|
|
2026-06-08 23:15:38 -07:00
|
|
|
# Manage code signing (with match). readonly on a dry run so we only verify the
|
|
|
|
|
# existing cert/profile resolve and never regenerate or mutate the certificates repo.
|
|
|
|
|
sync_code_signing(readonly: dry_run)
|
2022-08-04 23:47:08 -04:00
|
|
|
|
2022-09-13 23:46:42 -04:00
|
|
|
# Automatic signing is used during development, but fastlane needs to use manual signing.
|
|
|
|
|
update_code_signing_settings(
|
2023-01-20 00:45:06 -05:00
|
|
|
code_sign_identity: 'iPhone Distribution',
|
2022-09-13 23:46:42 -04:00
|
|
|
profile_name: 'match AppStore com.tommychow.frosty'
|
|
|
|
|
)
|
|
|
|
|
|
2022-08-04 23:47:08 -04:00
|
|
|
# Build the app for release.
|
|
|
|
|
build_app(
|
|
|
|
|
workspace: 'Runner.xcworkspace',
|
|
|
|
|
scheme: 'Runner',
|
|
|
|
|
output_directory: '../build/ios/archive'
|
2022-08-02 05:00:50 -04:00
|
|
|
)
|
2022-08-04 23:47:08 -04:00
|
|
|
|
2026-06-08 23:15:38 -07:00
|
|
|
# On a dry run, stop here: the signed archive above exercises every step that
|
|
|
|
|
# actually fails (ASC key, match certs/profiles, signing, release build). The
|
|
|
|
|
# App Store upload itself is the only remaining unverified step.
|
|
|
|
|
next if dry_run
|
|
|
|
|
|
2022-08-04 23:47:08 -04:00
|
|
|
# Upload the app to the App Store.
|
|
|
|
|
upload_to_app_store(
|
|
|
|
|
submit_for_review: true,
|
2022-08-07 21:24:39 -04:00
|
|
|
force: true, # Disable HTML summary prompt that appears when uploading to the App Store.
|
2022-09-12 22:49:11 -04:00
|
|
|
precheck_include_in_app_purchases: false, # Disabled due to not being supported with the App Store Connect API Key.
|
|
|
|
|
skip_screenshots: true,
|
|
|
|
|
automatic_release: true,
|
|
|
|
|
submission_information: { add_id_info_uses_idfa: false }
|
2022-08-02 05:00:50 -04:00
|
|
|
)
|
|
|
|
|
end
|
|
|
|
|
end
|