Slide 22
Slide 22 text
desc "Distributes a new build to App Store Connect"
lane :distribute do
version_number = git_branch.split("/", -1).last
setup_ci
xcode_select("/Applications/Xcode_16.app")
sync_code_signing(
type: "appstore",
app_identifier: ["com.appdiggershq.fosi"],
readonly: true
)
increment_version_number(version_number: version_number, xcodeproj: "Fosi.xcodeproj")
app_store_connect_api_key(
key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"],
issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
key_content: ENV["APP_STORE_CONNECT_KEY_CONTENT"]
)
build_number = latest_testflight_build_number + 1
increment_build_number(xcodeproj: "Fosi.xcodeproj", build_number: build_number)
build_app(scheme: "Fosi", configuration: 'Release', output_name: "Fosi.ipa")
upload_to_app_store(ipa: "Fosi.ipa", precheck_include_in_app_purchases: false)
if !git_status(path: "Fosi.xcodeproj/project.pbxproj").empty?
git_commit(path: "Fosi.xcodeproj/project.pbxproj", message: "[ci skip] [" release] Updating version")
push_to_git_remote(remote: "origin", remote_branch: git_branch)
end
end