Skip to content

feat: Fastlane 설정 완성 — match 및 상용/테섭 배포 자동화#77

Merged
gomminjae merged 3 commits intodevelopfrom
feature/fastlane-setup
Apr 13, 2026
Merged

feat: Fastlane 설정 완성 — match 및 상용/테섭 배포 자동화#77
gomminjae merged 3 commits intodevelopfrom
feature/fastlane-setup

Conversation

@gomminjae
Copy link
Copy Markdown
Owner

@gomminjae gomminjae commented Apr 13, 2026

Summary

  • Fastlane match를 통한 인증서/프로비저닝 프로파일 자동 동기화 (certificates repo newdok 브랜치)
  • 상용(beta_prod), 테섭(beta_dev), 동시배포(beta_all) lane 추가
  • TestFlight CD 워크플로우(deploy.yml) 추가
  • App Store Connect API Key 인증 방식 적용

Test plan

  • fastlane sync_certs 로컬 실행 성공 확인
  • fastlane beta_prod 로컬 TestFlight 배포 확인
  • fastlane beta_dev 로컬 TestFlight 배포 확인

🤖 Generated with Claude Code

gomminjae and others added 2 commits April 13, 2026 16:29
Gemfile, Appfile, Fastfile, Matchfile 생성 및 .gitignore 업데이트.
beta lane으로 Tuist generate → 빌드 → TestFlight 업로드 자동화.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Appfile: API Key 인증 방식으로 전환, itc_team_id 제거
- Matchfile: certificates repo(newdok 브랜치) 연동
- Fastfile: beta_prod, beta_dev, beta_all lane 추가, tuist 경로 수정
- deploy.yml: TestFlight CD 워크플로우 추가
- .gitignore: 코드 서명 파일 제외 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Fastlane to automate the iOS build and deployment process, including configuration for App Store Connect API keys, certificate synchronization via Match, and lanes for TestFlight distribution. The review feedback identifies several issues and improvement opportunities: a directory navigation error in the before_all block that would cause build commands to fail, a missing app_identifier in the development lane that could result in incorrect TestFlight uploads, and the use of hardcoded credentials. Additionally, the reviewer suggests refactoring duplicate lane logic and using Release configurations for all TestFlight builds to ensure environment consistency.

Comment thread fastlane/Fastfile Outdated
clean: true
)

upload_to_testflight(api_key: key)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

beta_dev 레인에서 upload_to_testflight 호출 시 app_identifier를 명시하지 않으면 Appfile에 정의된 기본값(com.newdok.app)을 사용하게 됩니다. beta_devcom.newdok.test를 대상으로 하므로, 업로드 대상 앱이 일치하지 않아 오류가 발생할 수 있습니다.

    upload_to_testflight(api_key: key, app_identifier: "com.newdok.test")

Comment thread fastlane/Fastfile
Comment on lines +5 to +8
Dir.chdir("..") do
sh("tuist", "install")
sh("tuist", "generate", "--no-open")
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

fastlane은 실행 시 자동으로 fastlane 폴더의 부모 디렉토리(프로젝트 루트)로 작업 디렉토리를 변경합니다. 따라서 Dir.chdir("..")를 호출하면 프로젝트 루트의 상위 디렉토리로 이동하게 되어 tuist 명령어가 프로젝트 파일을 찾지 못하고 실패하게 됩니다. 프로젝트 루트에서 명령어를 실행하도록 수정이 필요합니다.

    sh("tuist", "install")
    sh("tuist", "generate", "--no-open")

Comment thread fastlane/Appfile
@@ -0,0 +1,3 @@
app_identifier("com.newdok.app")
apple_id("dr8766@naver.com")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

apple_id가 하드코딩되어 있습니다. 여러 개발자가 협업하거나 CI 환경에서 실행할 때 각자의 계정을 유연하게 사용할 수 있도록 ENV["APPLE_ID"]와 같은 환경 변수를 사용하는 것을 권장합니다.

apple_id(ENV["APPLE_ID"])

Comment thread fastlane/Fastfile
Comment on lines +27 to +66
lane :beta_prod do
key = setup_api_key
match(type: "appstore", app_identifier: ["com.newdok.app"], api_key: key)

increment_build_number(
build_number: latest_testflight_build_number(api_key: key, app_identifier: "com.newdok.app") + 1,
xcodeproj: "Modules/App/App.xcodeproj"
)

build_app(
workspace: "Newdok.xcworkspace",
scheme: "Newdok",
configuration: "Release",
export_method: "app-store",
clean: true
)

upload_to_testflight(api_key: key)
end

desc "테섭 TestFlight 배포"
lane :beta_dev do
key = setup_api_key
match(type: "appstore", app_identifier: ["com.newdok.test"], api_key: key)

increment_build_number(
build_number: latest_testflight_build_number(api_key: key, app_identifier: "com.newdok.test") + 1,
xcodeproj: "Modules/App/App.xcodeproj"
)

build_app(
workspace: "Newdok.xcworkspace",
scheme: "Newdok",
configuration: "Debug",
export_method: "app-store",
clean: true
)

upload_to_testflight(api_key: key)
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

beta_prodbeta_dev 레인의 로직이 매우 유사합니다. app_identifier, configuration 등을 인자로 받는 공통 배포 lane을 만들어 중복을 제거하고 유지보수성을 높이는 것을 권장합니다.

Comment thread fastlane/Fastfile
build_app(
workspace: "Newdok.xcworkspace",
scheme: "Newdok",
configuration: "Debug",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

TestFlight 배포용 빌드에 Debug 구성을 사용하는 것은 권장되지 않습니다. Debug 구성은 최적화가 되어 있지 않고 디버깅용 코드나 로그가 포함될 수 있어, 실제 사용자 환경과 성능 및 동작 차이가 발생할 수 있습니다. 테섭용이라 하더라도 Release 구성을 기반으로 하되, 환경 설정만 다르게 한 별도의 Configuration(예: Staging)을 사용하는 것이 좋습니다.

      configuration: "Release",

Appfile 기본값(com.newdok.app)이 아닌 com.newdok.test로
업로드되도록 명시적으로 지정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gomminjae gomminjae merged commit 490c87a into develop Apr 13, 2026
2 checks passed
@gomminjae gomminjae deleted the feature/fastlane-setup branch April 13, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant