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
chmod 600 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:
API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }}

View File

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