11name : iOS TestFlight
22
33on :
4+ workflow_dispatch :
5+ inputs :
6+ upload_to_app_store_connect :
7+ description : Upload to App Store Connect
8+ required : true
9+ default : " false"
10+ type : choice
11+ options :
12+ - " false"
13+ - " true"
414 pull_request :
515 types :
616 - closed
@@ -25,16 +35,21 @@ permissions:
2535
2636jobs :
2737 testflight :
28- if : github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' && (contains(github.event.pull_request.labels.*.name, 'qa') || contains(github.event.pull_request.labels.*.name, 'qa-local'))
38+ if : github.event_name == 'workflow_dispatch' || (github. event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' && (contains(github.event.pull_request.labels.*.name, 'qa') || contains(github.event.pull_request.labels.*.name, 'qa-local') ))
2939 runs-on : macos-latest
3040 timeout-minutes : 45
3141
3242 steps :
3343 - name : Checkout merge commit
44+ if : github.event_name == 'pull_request'
3445 uses : actions/checkout@v5
3546 with :
3647 ref : ${{ github.event.pull_request.merge_commit_sha }}
3748
49+ - name : Checkout current ref
50+ if : github.event_name == 'workflow_dispatch'
51+ uses : actions/checkout@v5
52+
3853 - name : Install private config files
3954 uses : ./.github/actions/install-private-config
4055 with :
@@ -78,10 +93,10 @@ jobs:
7893 - name : Build for TestFlight
7994 run : bundle exec fastlane testflight_build_only
8095
81- - name : Skip TestFlight Upload for Local QA Label
82- if : contains(github.event.pull_request.labels.*.name, 'qa-local')
83- run : echo "Skipping TestFlight upload for PR labeled qa-local "
96+ - name : Skip TestFlight Upload
97+ if : (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'qa-local')) || (github.event_name == 'workflow_dispatch' && inputs.upload_to_app_store_connect != 'true ')
98+ run : echo "Skipping TestFlight upload"
8499
85100 - name : Upload to TestFlight
86- if : contains(github.event.pull_request.labels.*.name, 'qa') && !contains(github.event.pull_request.labels.*.name, 'qa-local')
101+ if : (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'qa') && !contains(github.event.pull_request.labels.*.name, 'qa-local')) || (github.event_name == 'workflow_dispatch' && inputs.upload_to_app_store_connect == 'true ')
87102 run : bundle exec fastlane upload_testflight_build
0 commit comments