diff --git a/.github/workflows/beta-deployment.yml b/.github/workflows/beta-deployment.yml index 95a3a8a..d6b4950 100644 --- a/.github/workflows/beta-deployment.yml +++ b/.github/workflows/beta-deployment.yml @@ -66,18 +66,18 @@ jobs: steps: - run: | echo "Injecting Environment Variables In Deployment Workflow: ${{ vars.FIREBASE_PROJECT_ID }}" - buildandtest: - name: Build and Test - needs: determineenvironment - uses: ./.github/workflows/build-and-test.yml - permissions: - contents: read - actions: read - security-events: write - secrets: inherit + # buildandtest: + # name: Build and Test + # needs: determineenvironment + # uses: ./.github/workflows/build-and-test.yml + # permissions: + # contents: read + # actions: read + # security-events: write + # secrets: inherit iosapptestflightdeployment: name: iOS App TestFlight Deployment - needs: [determineenvironment, buildandtest, vars] + needs: [determineenvironment, vars] # buildandtest uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 permissions: contents: read diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 268c7ea..a44f02c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -109,9 +109,11 @@ platform :ios do environment = options[:environment] || "staging" if environment == "production" - screenshots + unless app_in_review? + screenshots + end end - + signin increment_build_number( { @@ -125,7 +127,7 @@ platform :ios do deliver( submit_for_review: true, force: true, - overwrite_screenshots: true, + overwrite_screenshots: !app_in_review?, automatic_release: true, precheck_include_in_app_purchases: false, metadata_path: "./fastlane/metadata", @@ -143,4 +145,14 @@ platform :ios do ) end end + + + private_lane :app_in_review? do + app = Spaceship::Tunes::Application.find(ENV['APP_IDENTIFIER']) + version = app.edit_version || app.live_version + review_status = version.app_status + + # Check if the app's status indicates it's in review + return review_status == "waiting_for_review" || review_status == "in_review" + end end