diff --git a/.env.example b/.env.example index e69de29b..0096e2ae 100644 --- a/.env.example +++ b/.env.example @@ -0,0 +1,3 @@ +API_KEY_ID="" +ISSUER_ID="" +APPSTORE_CONNECT_API_KEY="" diff --git a/fastlane/Constants/Constant.swift b/fastlane/Constants/Constant.swift index eb134fb6..c167b9f2 100644 --- a/fastlane/Constants/Constant.swift +++ b/fastlane/Constants/Constant.swift @@ -28,6 +28,12 @@ enum Constant { static let appleProductionTeamId = "<#teamId#>" static let keychainName = "{PROJECT_NAME}_keychain" static let matchURL = "git@github.com:{organization}/{repo}.git" + static let apiKey: [String: Any] = [ + "key_id" : Secret.appStoreKeyIdKey, + "issuer_id": Secret.appStoreIssuerIdKey, + "key": Secret.appstoreConnectAPIKey, + "in_house": false + ] // MARK: - Path diff --git a/fastlane/Fastfile.swift b/fastlane/Fastfile.swift index a5377234..35fe6bbf 100644 --- a/fastlane/Fastfile.swift +++ b/fastlane/Fastfile.swift @@ -172,6 +172,7 @@ class Fastfile: LaneFile { registerDevice( name: deviceName, udid: deviceUDID, + apiKey: .userDefined(Constant.apiKey), teamId: .userDefined(Constant.appleStagingTeamId) ) diff --git a/fastlane/Helpers/Match.swift b/fastlane/Helpers/Match.swift index 2bcdd392..2cf6c2a2 100644 --- a/fastlane/Helpers/Match.swift +++ b/fastlane/Helpers/Match.swift @@ -27,6 +27,7 @@ enum Match { type: type.match, readonly: .userDefined(!isForce), appIdentifier: [environment.bundleId], + apiKey: isForce ? .userDefined(Constant.apiKey) : .nil, username: .userDefined(environment.appleUsername), teamId: .userDefined(environment.appleTeamId), gitUrl: Constant.matchURL,