Docs/#501 cicd 문서화 - #502
Merged
Hidden character warning
The head ref may contain hidden characters: "docs/#501-\ubb38\uc11c\ud654"
Merged
Conversation
Closed
1 task
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughFastlane 기본 문서를 제거하고, 브랜치별 배포 흐름과 App Store Connect 인증, GitHub Secrets, Fastfile lane, GitHub Actions 실행 조건을 설명하는 CI/CD 문서로 대체했습니다. ChangesFastlane CI/CD 문서
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 연결된 이슈
📄 작업 내용
Fastlane, GitHub Actions을 통한 CI/CD
0. 개요
develop/release브랜치에 PR이 머지될 때 Fastlane을 통해 자동으로 TestFlight / App Store에 배포되는 CI/CD 파이프라인을 구축했습니다. .develop→ PR Merge 시 → TestFlight 자동 업로드release→ PR Merge 시 → App Store 자동 심사 제출1. 기본 구조 설계
2. App Store Connect API
도입
처음엔 Apple ID + 비밀번호 기반 인증(
APPLE_ID,APPLE_PASSWORD,FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD)으로 시작했으나, 2단계 인증(2FA)이 걸린 계정은 CI 환경에서 위 방식을 통한 로그인이 막힌다는 걸 확인했습니다. 이후 비밀번호 기반 인증에서 App Store Connect API Key 방식으로 전환했습니다.개념
동작 원리
.p8파일)를 다운로드하게 됩니다. 이 파일은 최초 1회만 다운로드 가능하며 Apple 서버에는 공개키만 보관됩니다.Authorization: Bearer {token}헤더에 실어서 전송합니다.구성 요소 3가지
3. GitHub Secrets 설계
GitHub Secrets 목록
APP_STORE_CONNECT_API_KEY_KEY_IDAPP_STORE_CONNECT_API_KEY_ISSUER_IDAPP_STORE_CONNECT_API_KEY_CONTENT.p8키 파일을 base64 인코딩한 값APP_IDENTIFIERTEAM_IDPRIVATE_REPOSITORYMATCH_GIT_BASIC_AUTHORIZATIONusername:PAT를 base64 인코딩한 값MATCH_PASSWORDDISCORD_URLAPI Key 발급 및 인코딩 방법
Match Git 인증 값 생성 방법
4. Fastfile 구성
prepare_ci_and_signingsetup_ci)match)update_project_team)next_build_numberYYYYMMDDHHMM형식으로 생성하여 재배포 시에도 항상 이전보다 큰 값을 보장합니다.notify_discord_success/notify_discord_failurebegin/rescue로 감싸서 실패 시에도 Discord 알림 후 CI를 실패 처리합니다.upload_to_app_store옵션 정리submit_for_reviewtrueautomatic_releasefalseprecheck_include_in_app_purchasesfalsesubmission_information.add_id_info_uses_idfafalsesubmission_information.export_compliance_uses_encryptionfalseskip_metadatafalserelease_notes.txt(What's New)를 반영하기 위해 활성화skip_app_version_updatetrueRelease Note 관리 방식
배포 때마다 코드를 수정하지 않도록,
fastlane/metadata/ko/release_notes.txt파일을 별도로 관리합니다. 배포 전 이 파일의 내용만 갱신하고 커밋하면 자동으로 반영됩니다.5. GitHub Actionss Workflow
pull_request+types: [closed]+if: merged == truegithub.event.pull_request.base.ref로 어느 브랜치에 머지됐는지 판별해 lane을 분기합니다.defaults.run.working-directory로 모든 step이ByeBoo-iOS/하위(Gemfile, Fastfile이 있는 위치)에서 실행되도록 통일합니다.Summary by CodeRabbit