11name : iOS TestFlight
22
33on :
4- push :
5- tags :
6- - " qa-*"
7- workflow_dispatch :
4+ pull_request :
5+ types :
6+ - closed
7+ branches :
8+ - develop
89
910env :
1011 SCHEME : DevLog
@@ -24,12 +25,15 @@ permissions:
2425
2526jobs :
2627 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'))
2729 runs-on : macos-latest
2830 timeout-minutes : 45
2931
3032 steps :
31- - name : Checkout
33+ - name : Checkout merge commit
3234 uses : actions/checkout@v5
35+ with :
36+ ref : ${{ github.event.pull_request.merge_commit_sha }}
3337
3438 - name : Install private config files
3539 uses : ./.github/actions/install-private-config
@@ -74,10 +78,10 @@ jobs:
7478 - name : Build for TestFlight
7579 run : bundle exec fastlane testflight_build_only
7680
77- - name : Skip TestFlight Upload for Local QA Tag
78- if : github.event_name == 'push' && startsWith (github.ref_name , 'qa-local- ')
79- run : echo "Skipping TestFlight upload for local QA tag ${GITHUB_REF_NAME} "
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 "
8084
8185 - name : Upload to TestFlight
82- if : github.event_name != 'push' || !startsWith (github.ref_name , 'qa-local- ')
86+ if : contains( github.event.pull_request.labels.*.name, 'qa') && !contains (github.event.pull_request.labels.*.name , 'qa-local')
8387 run : bundle exec fastlane upload_testflight_build
0 commit comments