Skip to content

Instantly share code, notes, and snippets.

@pilot34
Last active January 29, 2020 17:37
Show Gist options
  • Save pilot34/dbd5e2b2da0e2bb32c3e433e4b4dfa23 to your computer and use it in GitHub Desktop.
Save pilot34/dbd5e2b2da0e2bb32c3e433e4b4dfa23 to your computer and use it in GitHub Desktop.
CircleCI 2.0 iOS Signing without Match
private_lane :prepare_certificates do |options|
sh("base64 -D -o Certificates.p12 <<< \"#{ENV['APPLE_CERTIFICATE']}\"", log: false)
create_keychain(
name: "default_keychain",
default_keychain: true,
unlock: true,
password: "default"
)
import_certificate(
certificate_path: "fastlane/Certificates.p12",
certificate_password: ENV['APPLE_CERTIFICATE_PASSWORD'],
keychain_name: "default_keychain",
keychain_password: "default"
)
unlock_keychain(path:"default_keychain", password:"default")
sh "security set-keychain-settings -t 3600 -l ~/Library/Keychains/default_keychain-db"
sigh(readonly: true, adhoc: true, skip_certificate_verification: true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment