From 1387e20553f9031f03336c30b0da30af63536586 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 6 Aug 2025 15:42:02 +0300 Subject: [PATCH] fix: fastlane --- .gitea/workflows/test-flight-cd.yaml | 45 ++-------------------------- ios/fastlane/Fastfile | 32 ++------------------ 2 files changed, 4 insertions(+), 73 deletions(-) diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index 1f9668f6..4320ecc5 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -11,30 +11,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Checkout env repository - uses: actions/checkout@v2 - with: - repository: mso7nueh/eatvio_app_env - path: env_repo - token: ${{ vars.MSO7NUEH_TOKEN }} - ref: main - - - name: Copy .env file - run: | - mkdir -p env - cp env_repo/.env env/.env - - - name: Load environment variables from .env - run: | - set -a - source env/.env - set +a - # Export all variables to GITHUB_ENV - while IFS= read -r line; do - if [[ $line =~ ^[A-Za-z_][A-Za-z0-9_]*= ]]; then - echo "$line" >> $GITHUB_ENV - fi - done < env/.env - name: Unlock login keychain run: | @@ -51,24 +27,7 @@ jobs: flutter pub run build_runner build --delete-conflicting-outputs cd ios pod update - # Install/update fastlane - bundle install - # Retry logic for fastlane upload - for i in {1..3}; do - echo "Attempt $i of 3 for fastlane upload" - if bundle exec fastlane beta; then - echo "Fastlane upload successful on attempt $i" - break - else - echo "Fastlane upload failed on attempt $i" - if [ $i -eq 3 ]; then - echo "All attempts failed" - exit 1 - fi - echo "Waiting 30 seconds before retry..." - sleep 30 - fi - done + fastlane beta env: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 @@ -77,4 +36,4 @@ jobs: MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/fastlane FASTLANE_USER: eatvio2023@icloud.com FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ vars.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} - API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }} + API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }} \ No newline at end of file diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 72d89b2c..9340117d 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -20,36 +20,8 @@ platform :ios do lane :beta do match(type: "appstore", readonly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") - build_app( - workspace: "Runner.xcworkspace", - scheme: "Runner", - export_method: "app-store", - codesigning_identity: "Apple Distribution", - xcargs: "--dart-define=HIDE_PLANS=true" - ) + build_app(workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store", codesigning_identity: "Apple Distribution") app_store_connect_api_key(key_id: "325JS9JCZH", issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", key_filepath: "./AuthKey.p8") - - # Try the newer upload method first, fallback to the older one - begin - upload_to_app_store_connect( - api_key_path: "./AuthKey.p8", - api_key_id: "325JS9JCZH", - api_issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3", - skip_metadata: true, - skip_screenshots: true, - precheck_include_in_app_purchases: false - ) - rescue => e - UI.message("upload_to_app_store_connect failed, trying upload_to_testflight: #{e.message}") - upload_to_testflight( - skip_waiting_for_build_processing: true, - skip_submission: true, - reject_if_possible: false, - precheck_include_in_app_purchases: false, - api_key_path: "./AuthKey.p8", - api_key_id: "325JS9JCZH", - api_issuer_id: "dfa27d1d-2bb8-4d4d-847e-0b32f9b880b3" - ) - end + upload_to_testflight end end