Skip to content

Commit

Permalink
Update Action
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed Aug 10, 2024
1 parent 098e803 commit ffa19ac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/beta-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 15 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand All @@ -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",
Expand All @@ -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

0 comments on commit ffa19ac

Please sign in to comment.