Compare commits
	
		
			1 Commits
		
	
	
		
			v0.1.0
			...
			c2f3ef1d32
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c2f3ef1d32 | 
@@ -41,6 +41,12 @@ jobs:
 | 
				
			|||||||
            secret/release IOS_ASC_KEY_ID | IOS_ASC_KEY_ID ;
 | 
					            secret/release IOS_ASC_KEY_ID | IOS_ASC_KEY_ID ;
 | 
				
			||||||
            secret/release IOS_ASC_ISSUER_ID | IOS_ASC_ISSUER_ID ;
 | 
					            secret/release IOS_ASC_ISSUER_ID | IOS_ASC_ISSUER_ID ;
 | 
				
			||||||
            secret/release IOS_ASC_KEY_P8 | IOS_ASC_KEY_P8 ;
 | 
					            secret/release IOS_ASC_KEY_P8 | IOS_ASC_KEY_P8 ;
 | 
				
			||||||
 | 
					            secret/release IOS_MATCH_REPO_SSH_KEY_BASE64 | IOS_MATCH_REPO_SSH_KEY_BASE64 ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Setup SSH key for match git repo
 | 
				
			||||||
 | 
					        run: echo "$MATCH_REPO_SSH_KEY" | base64 --decode > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          MATCH_REPO_SSH_KEY: ${{ steps.load-secrets.outputs.IOS_MATCH_REPO_SSH_KEY_BASE64 }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install fastlane
 | 
					      - name: Install fastlane
 | 
				
			||||||
        run: bundle install
 | 
					        run: bundle install
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,70 +7,25 @@ platform :ios do
 | 
				
			|||||||
    app_store_connect_api_key(
 | 
					    app_store_connect_api_key(
 | 
				
			||||||
      key_id: ENV["IOS_ASC_KEY_ID"],
 | 
					      key_id: ENV["IOS_ASC_KEY_ID"],
 | 
				
			||||||
      issuer_id: ENV["IOS_ASC_ISSUER_ID"],
 | 
					      issuer_id: ENV["IOS_ASC_ISSUER_ID"],
 | 
				
			||||||
      key_content: ENV["IOS_ASC_KEY_P8"],
 | 
					      key_content: ENV["IOS_ASC_KEY"],
 | 
				
			||||||
      is_key_content_base64: true,
 | 
					      is_key_content_base64: true,
 | 
				
			||||||
      in_house: false
 | 
					      in_house: false
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  desc "Installs signing certificate in the keychain and downloads provisioning profiles from App Store Connect"
 | 
					 | 
				
			||||||
  lane :prepare_signing do |options|
 | 
					 | 
				
			||||||
    team_id = CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
 | 
					 | 
				
			||||||
    api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    keychain_name = "signing"
 | 
					 | 
				
			||||||
    keychain_password = "temp"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    delete_keychain(
 | 
					 | 
				
			||||||
      name: keychain_name
 | 
					 | 
				
			||||||
    ) if File.exist? File.expand_path("~/Library/Keychains/#{keychain_name}-db")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    create_keychain(
 | 
					 | 
				
			||||||
      name: keychain_name,
 | 
					 | 
				
			||||||
      password: keychain_password,
 | 
					 | 
				
			||||||
      default_keychain: true,
 | 
					 | 
				
			||||||
      unlock: true,
 | 
					 | 
				
			||||||
      timeout: 3600
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    import_certificate(
 | 
					 | 
				
			||||||
      certificate_path: ENV["SIGNING_KEY_FILE_PATH"],
 | 
					 | 
				
			||||||
      certificate_password: ENV["SIGNING_KEY_PASSWORD"],
 | 
					 | 
				
			||||||
      keychain_name: keychain_name,
 | 
					 | 
				
			||||||
      keychain_password: keychain_password
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # fetches and installs provisioning profiles from ASC
 | 
					 | 
				
			||||||
    sigh(
 | 
					 | 
				
			||||||
      adhoc: options[:adhoc],
 | 
					 | 
				
			||||||
      api_key: api_key,
 | 
					 | 
				
			||||||
      readonly: true
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  desc "Deploy a new version to closed testing (testflight)"
 | 
					  desc "Deploy a new version to closed testing (testflight)"
 | 
				
			||||||
  lane :deploy_testing do
 | 
					  lane :deploy_testing do
 | 
				
			||||||
    build_name = ENV["BUILD_NAME"]
 | 
					    build_name = ENV["BUILD_NAME"]
 | 
				
			||||||
    build_number = ENV["BUILD_NUMBER"]
 | 
					    build_number = ENV["BUILD_NUMBER"]
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    load_asc_api_token
 | 
					    load_asc_api_token
 | 
				
			||||||
    prepare_signing
 | 
					    api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    profile_name = "App Provisioning Profile" # replace with the name of the profile to use for the build
 | 
					    sync_code_signing(
 | 
				
			||||||
    output_name = "example-iOS" # specify the name of the .ipa file to generate
 | 
					      api_key: api_key,
 | 
				
			||||||
    export_method = "app-store" # specify the export method
 | 
					      type: "testflight",
 | 
				
			||||||
    
 | 
					      readonly: true,
 | 
				
			||||||
    # turn off automatic signing during build so correct code signing identity is guaranteed to be used
 | 
					 | 
				
			||||||
    update_code_signing_settings(
 | 
					 | 
				
			||||||
      use_automatic_signing: false,
 | 
					 | 
				
			||||||
      targets: ["main-target"], # specify which targets to update code signing settings for
 | 
					 | 
				
			||||||
      code_sign_identity: "Apple Distribution", # replace with name of code signing identity if different
 | 
					 | 
				
			||||||
      bundle_identifier: app_identifier,
 | 
					 | 
				
			||||||
      profile_name: profile_name,
 | 
					 | 
				
			||||||
      build_configurations: ["Release"] # only toggle code signing settings for Release configurations
 | 
					 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -87,10 +42,6 @@ platform :ios do
 | 
				
			|||||||
    build_app(
 | 
					    build_app(
 | 
				
			||||||
      skip_build_archive: true,
 | 
					      skip_build_archive: true,
 | 
				
			||||||
      archive_path: "../build/ios/archive/Runner.xcarchive"
 | 
					      archive_path: "../build/ios/archive/Runner.xcarchive"
 | 
				
			||||||
      provisioningProfiles: {
 | 
					 | 
				
			||||||
        app_identifier => profile_name
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    upload_to_testflight
 | 
					    upload_to_testflight
 | 
				
			||||||
@@ -99,11 +50,12 @@ platform :ios do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  desc "Deploy a new version as a full release"
 | 
					  desc "Deploy a new version as a full release"
 | 
				
			||||||
  lane :deploy_release do
 | 
					  lane :deploy_release do
 | 
				
			||||||
 | 
					 | 
				
			||||||
    build_name = ENV["BUILD_NAME"]
 | 
					    build_name = ENV["BUILD_NAME"]
 | 
				
			||||||
    build_number = ENV["BUILD_NUMBER"]
 | 
					    build_number = ENV["BUILD_NUMBER"]
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    load_asc_api_token
 | 
				
			||||||
    api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
 | 
					    api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sync_code_signing(
 | 
					    sync_code_signing(
 | 
				
			||||||
      api_key: api_key,
 | 
					      api_key: api_key,
 | 
				
			||||||
      type: "appstore",
 | 
					      type: "appstore",
 | 
				
			||||||
@@ -136,5 +88,4 @@ platform :ios do
 | 
				
			|||||||
      # automatically release the app after review
 | 
					      # automatically release the app after review
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,8 +2,8 @@
 | 
				
			|||||||
# DO NOT EDIT THIS FILE
 | 
					# DO NOT EDIT THIS FILE
 | 
				
			||||||
# Copy this file to local.env and edit the values to match your local environment
 | 
					# Copy this file to local.env and edit the values to match your local environment
 | 
				
			||||||
IOS_ASC_KEY_ID="sample"
 | 
					IOS_ASC_KEY_ID="sample"
 | 
				
			||||||
 | 
					IOS_ASC_KEY="sample"
 | 
				
			||||||
IOS_ASC_ISSUER_ID="sample"
 | 
					IOS_ASC_ISSUER_ID="sample"
 | 
				
			||||||
IOS_ASC_KEY_P8="sample"
 | 
					 | 
				
			||||||
SIGNING_KEY_FILE_PATH="sample"
 | 
					SIGNING_KEY_FILE_PATH="sample"
 | 
				
			||||||
SIGNING_KEY_PASSWORD="sample"
 | 
					SIGNING_KEY_PASSWORD="sample"
 | 
				
			||||||
BUILD_NAME="sample"
 | 
					BUILD_NAME="sample"
 | 
				
			||||||
		Reference in New Issue
	
	Block a user