Skip to content

Commit

Permalink
Add lanes for getting Developer ID as well as ASC certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Jul 31, 2024
1 parent 7a2d820 commit 8fe3fd8
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ lane :build_and_upload_app_store do |options|

setup_ci

app_store_code_signing
configure_code_signing_release

archive_path = File.join(BUILD_FOLDER, 'Simplenote-Mac.xcarchive')
build_simplenote(
Expand Down Expand Up @@ -499,13 +499,20 @@ lane :download_strings_files_from_glotpress do
)
end

# Downloads all the required certificates and profiles for the production build.
# Optionally, it can create any new necessary certificates or profiles.
#
# @option [Boolean] readonly (default: true) Whether to only fetch existing certificates and profiles, without generating new ones.
lane :app_store_code_signing do |options|
# Fail early if secrets not available via `get_required_env`.
# Otherwise, Fastlane will prompt to type them.
lane :configure_code_signing do |readonly: true|
configure_code_signing_app_center(readonly: readonly)
configure_code_signing_app_store(readonly: readonly)
end

lane :configure_code_signing_app_center do |readonly: true|
configure_code_signing(type: 'developer_id', readonly: readonly)
end

lane :configure_code_signing_app_store do |readonly: true|
configure_code_signing(type: 'appstore', readonly: readonly)
end

def configure_code_signing(type:, readonly: true)
access_key = get_required_env('MATCH_S3_ACCESS_KEY')
secret_access_key = get_required_env('MATCH_S3_SECRET_ACCESS_KEY')

Expand All @@ -516,11 +523,9 @@ lane :app_store_code_signing do |options|
s3_access_key: access_key,
s3_secret_access_key: secret_access_key,
team_id: APPLE_TEAM_ID,
type: 'appstore',
type: type,
platform: 'macos',
# This Mac app also needs a Mac Installer Distribution certificate
additional_cert_types: 'mac_installer_distribution',
readonly: options.fetch(:readonly, true),
readonly: readonly,
app_identifier: [
APP_STORE_BUNDLE_IDENTIFIER,
APP_STORE_BUNDLE_IDENTIFIER_INTENTS
Expand Down

0 comments on commit 8fe3fd8

Please sign in to comment.