Skip to content

Commit ad9c547

Browse files
authored
[#300] TestFlight 배포를 태그 푸시가 아닌 PR 머지 트리거로 수정한다 (#301)
- chore: testflight 배포를 태그 대신 레이블로 트리거 수정
1 parent a658eeb commit ad9c547

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/testflight.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: iOS TestFlight
22

33
on:
4-
push:
5-
tags:
6-
- "qa-*"
7-
workflow_dispatch:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- develop
89

910
env:
1011
SCHEME: DevLog
@@ -24,12 +25,15 @@ permissions:
2425

2526
jobs:
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

Comments
 (0)