Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- desc "Build and submit to TestFlight"
- lane :submit_testflight do
- # 1) Create a keychain
- keychain_name = "certs"
- create_keychain(
- name: keychain_name,
- default_keychain: false,
- timeout: 3600,
- password: SecureRandom.base64,
- unlock: true
- )
- # 2) Import distribution certificate
- import_certificate(
- certificate_path: "/path/to/your/certificate",
- certificate_password: ENV["KEY_PASSWORD"],
- keychain_name: keychain_name
- )
- # 3) Download provisioning profile
- sigh(
- username: "your_apple_id_username",
- provisioning_name: "your_provisioning_profile_name",
- team_id: "your_team_id",
- cert_id: "your_cert_id"
- )
- # 4) Increment the build number
- increment_build_number(
- build_number: Time.now.to_i
- )
- # 5) Build the app
- gym(
- clean: true,
- workspace: "/path/to/your/workspace",
- output_name: "VTS.ipa",
- scheme: "VTS App Store",
- codesigning_identity: "your_codesigning_identity",
- xcargs: "PROVISIONING_PROFILE_SPECIFIER='your_provisioning_prof'"
- )
- # 6) Release to TestFlight
- pilot(username: "your_app_id_username")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement