fix: fastlane

This commit is contained in:
mso7nueh
2025-08-08 11:23:55 +03:00
parent d8378e3686
commit cdb6fcb462
2 changed files with 25 additions and 7 deletions

View File

@@ -47,6 +47,9 @@ jobs:
echo "${API_APPSTORE_KEY}" | tr -d '\n' | base64 --decode > ios/AuthKey.p8 echo "${API_APPSTORE_KEY}" | tr -d '\n' | base64 --decode > ios/AuthKey.p8
chmod 600 ios/AuthKey.p8 chmod 600 ios/AuthKey.p8
ls -la ios/AuthKey.p8 ls -la ios/AuthKey.p8
echo "File size: $(wc -c < ios/AuthKey.p8) bytes"
echo "Contents of ios directory:"
ls -la ios/
env: env:
API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }} API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }}

View File

@@ -18,13 +18,28 @@ default_platform(:ios)
platform :ios do platform :ios do
desc "Push a new beta build to TestFlight" desc "Push a new beta build to TestFlight"
lane :beta do lane :beta do
UI.message "Current working directory: #{Dir.pwd}"
UI.message "Checking API key file..." UI.message "Checking API key file..."
auth_key_path = "../AuthKey.p8" possible_paths = [
if File.exist?(auth_key_path) "../AuthKey.p8",
UI.message "API key file exists" "./AuthKey.p8",
else "../../AuthKey.p8",
UI.user_error!("API key file not found at #{auth_key_path}") File.expand_path("../AuthKey.p8"),
File.expand_path("./AuthKey.p8")
]
auth_key_path = nil
possible_paths.each do |path|
if File.exist?(path)
UI.message "Found AuthKey.p8 at: #{path}"
auth_key_path = path
break
end
end
if auth_key_path.nil?
UI.user_error!("API key file not found. Tried paths: #{possible_paths.join(', ')}")
end end
match(type: "appstore", readonly: true) match(type: "appstore", readonly: true)
@@ -41,14 +56,14 @@ platform :ios do
app_store_connect_api_key( app_store_connect_api_key(
key_id: "325JS9JCZH", key_id: "325JS9JCZH",
issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3",
key_filepath: "../AuthKey.p8", key_filepath: auth_key_path,
duration: 1200, duration: 1200,
in_house: false in_house: false
) )
begin begin
upload_to_testflight( upload_to_testflight(
api_key_path: "../AuthKey.p8", api_key_path: auth_key_path,
skip_waiting_for_build_processing: true, skip_waiting_for_build_processing: true,
skip_submission: true, skip_submission: true,
distribute_external: false, distribute_external: false,