From fd0e58965acb994abc10b554c525eb205b99d770 Mon Sep 17 00:00:00 2001 From: cryingdance Date: Wed, 19 Apr 2023 11:32:38 +0900 Subject: [PATCH] add build_path param --- README.md | 4 ++++ action.yml | 4 ++++ fastlane/Fastfile | 4 +++- index.js | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6e15ba..f9b7764 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,10 @@ The SDK that should be used for building the application. Default `""`. For exam Use a custom destination for building the app. Default `""`. For example, `"generic/platform=iOS"`. +### `build-path` + +Use a custom build path for building the app. Default `"/Users/{user}/Library/Developer/Xcode/Archives/{date}"`. For example, `"./archive"`. + ### `increment-version-number` Increment the version number of your project. Supports `"patch"`, `"minor"`, `"major"` or a specific version number. Default `""`. diff --git a/action.yml b/action.yml index c1ca2f4..e796fa9 100644 --- a/action.yml +++ b/action.yml @@ -110,6 +110,10 @@ inputs: description: 'Base64 encoded App Store Connect API Key' required: false default: "" + build-path: + description: 'Build path' + required: false + default: "" runs: using: "node12" main: "dist/index.js" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3375e4f..c6cb8e3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -145,6 +145,7 @@ platform :ios do use_build_sdk = !ENV['BUILD_SDK'].empty? use_build_destination = !ENV['BUILD_DESTINATION'].empty? use_cloned_source_packages_path = !ENV['CLONED_SOURCE_PACKAGES_PATH'].empty? + use_build_path = !ENV['BUILD_PATH'].empty? if !ENV['INCREMENT_BUILD_NUMBER'].empty? if ENV['INCREMENT_BUILD_NUMBER'] == 'true' @@ -205,7 +206,8 @@ platform :ios do export_options: use_export_options ? ENV['EXPORT_OPTIONS'] : nil, skip_profile_detection: use_export_options, sdk: use_build_sdk ? ENV['BUILD_SDK'] : nil, - destination: use_build_destination ? ENV['BUILD_DESTINATION'] : nil + destination: use_build_destination ? ENV['BUILD_DESTINATION'] : nil, + build_path: use_build_path ? ENV['BUILD_PATH'] ? : nil ) delete_keychain(name: 'ios-build.keychain') diff --git a/index.js b/index.js index ef17bae..93f09ca 100644 --- a/index.js +++ b/index.js @@ -64,6 +64,7 @@ async function run() { process.env.APP_STORE_CONNECT_API_KEY_ID = core.getInput('app-store-connect-api-key-id'); process.env.APP_STORE_CONNECT_API_KEY_ISSUER_ID = core.getInput('app-store-connect-api-key-issuer-id'); process.env.APP_STORE_CONNECT_API_KEY_BASE64 = core.getInput('app-store-connect-api-key-base64'); + process.env.BUILD_PATH = core.getInput('build-path'); // Execute build.sh await exec.exec(`bash ${__dirname}/../build.sh`);