From 354d2baa0158a06a2074bfd8d6ad2ce9437ca0d4 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 23 Nov 2022 14:02:54 +0200 Subject: [PATCH] Specify and fetch the NSE provisioning profile when building Alphas (#334) Specify and fetch the NSE provisioning profile when building Alphas --- .github/workflows/release-alpha.yml | 1 - fastlane/Fastfile | 53 ++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml index 444548f71..2a530697d 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/release-alpha.yml @@ -2,7 +2,6 @@ name: Alpha release on: pull_request: - types: [ labeled, synchronized, opened, reopened ] workflow_dispatch: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 539599e78..fdc82afd9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -6,28 +6,48 @@ before_all do end lane :alpha do - config_xcodegen_alpha() - - provisioning_profile_name = "ElementX PR Ad Hoc" - bundle_identifier = "io.element.elementx.pr" - code_signing_identity = "Apple Distribution: Vector Creations Limited (7J4U792NQT)" - - update_code_signing_settings( - use_automatic_signing: false, - bundle_identifier: bundle_identifier, - profile_name: provisioning_profile_name, - code_sign_identity: code_signing_identity - ) - app_store_connect_api_key( key_id: ENV["APPSTORECONNECT_KEY_ID"], issuer_id: ENV["APPSTORECONNECT_KEY_ISSUER_ID"], key_content: ENV["APPSTORECONNECT_KEY_CONTENT"] ) + config_xcodegen_alpha() + + code_signing_identity = "Apple Distribution: Vector Creations Limited (7J4U792NQT)" + + app_provisioning_profile_name = "ElementX PR Ad Hoc" + app_bundle_identifier = "io.element.elementx.pr" + + nse_provisioning_profile_name = "ElementX NSE PR Ad Hoc" + nse_bundle_identifier = "io.element.elementx.pr.nse" + + update_code_signing_settings( + targets: ["ElementX"], + use_automatic_signing: false, + bundle_identifier: app_bundle_identifier, + profile_name: app_provisioning_profile_name, + code_sign_identity: code_signing_identity + ) + get_provisioning_profile( - app_identifier: bundle_identifier, - provisioning_name: provisioning_profile_name, + app_identifier: app_bundle_identifier, + provisioning_name: app_provisioning_profile_name, + ignore_profiles_with_different_name: true, + adhoc: true + ) + + update_code_signing_settings( + targets: ["NSE"], + use_automatic_signing: false, + bundle_identifier: nse_bundle_identifier, + profile_name: nse_provisioning_profile_name, + code_sign_identity: code_signing_identity + ) + + get_provisioning_profile( + app_identifier: nse_bundle_identifier, + provisioning_name: nse_provisioning_profile_name, ignore_profiles_with_different_name: true, adhoc: true ) @@ -39,7 +59,8 @@ lane :alpha do output_directory: "build", export_options: { provisioningProfiles: { - bundle_identifier => provisioning_profile_name, + app_bundle_identifier => app_provisioning_profile_name, + nse_bundle_identifier => nse_provisioning_profile_name } } )