Skip to content

Instantly share code, notes, and snippets.

@sebalopez
Last active September 16, 2020 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebalopez/963af49f3636ead8c16c607f8c70f031 to your computer and use it in GitHub Desktop.
Save sebalopez/963af49f3636ead8c16c607f8c70f031 to your computer and use it in GitHub Desktop.
iOS Fastfile build lane
lane :prepare_keychain do
# Create keychain - (Travis setup works for GitHhub Actions too)
setup_ci(
force: true,
provider: "travis"
)
# Unlock keychain and set as default
unlock_keychain(
path: "fastlane_tmp_keychain",
password: "",
set_default: true
)
# Import .cer and .p12 - this is a workaround for fastlane match when we retrieve certs from a custom location
import_certificate(
certificate_path: key,
certificate_password: key_pwd,
keychain_name: "fastlane_tmp_keychain",
keychain_password: "",
log_output: true
)
import_certificate(
certificate_path: cert,
keychain_name: "fastlane_tmp_keychain",
keychain_password: "",
log_output: true
)
end
lane :build_and_sign do |options|
# pod install
cocoapods(
repo_update: true
)
# Build and Archive app
gym(
scheme: options[:scheme],
workspace: workspace,
export_method: options[:method],
clean: true,
output_name: options[:scheme]+".ipa",
export_team_id: team_id
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment