Created
December 29, 2021 07:14
-
-
Save koingdev/40fca4418888886d9adbdf41585290e4 to your computer and use it in GitHub Desktop.
Fastlane to upload TestFlight on pushing git tag
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
lane :upload_testflight_on_pushing_tag do |options| | |
# Tag: Release-1.0.0-100 (Release-Version-Build) | |
tag_components = sh("git tag --sort=taggerdate | tail -1").split("-") | |
version = tag_components[1] | |
build = tag_components[2] | |
# Increment version and build number | |
increment_version_and_build_number(version: version, build: build) | |
# Generate iPA | |
build_ios_app( | |
clean: true, | |
scheme: "Release", | |
configuration: "Release", | |
derived_data_path: "Build", | |
output_directory: "./artifacts/device", | |
workspace: "App.xcworkspace", | |
export_method: "app-store", | |
export_options: { | |
uploadBitcode: false, | |
compileBitcode: false, | |
include_symbols: true, | |
teamID: "TEAM_ID", | |
provisioningProfiles: { | |
"BUNDLE_ID" => "PROFILE_UUID" | |
} | |
} | |
) | |
# Upload iPA: required both params apple_id & skip_waiting_for_build_processing to bypass Apple 2FA | |
upload_to_testflight( | |
ipa: "./artifacts/device/App.ipa", | |
apple_id: "APPLE_ID_IN_GENERAL_INFORMATION_SECTION_ON_APPSTORECONNECT", | |
skip_submission: true, | |
skip_waiting_for_build_processing: true | |
) | |
# Upload dSYM | |
upload_symbols_to_crashlytics(dsym_path: "./artifacts/device/App.app.dSYM.zip") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment