Skip to content

[chore] Android/iOS 릴리즈 빌드 CI 자동화 (AAB/IPA 산출물 추출) - #317

Open
jeonbinggu wants to merge 16 commits into
developfrom
chore/android-ios-build-ci(#312)
Open

[chore] Android/iOS 릴리즈 빌드 CI 자동화 (AAB/IPA 산출물 추출)#317
jeonbinggu wants to merge 16 commits into
developfrom
chore/android-ios-build-ci(#312)

Conversation

@jeonbinggu

@jeonbinggu jeonbinggu commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🔀 Pull Request Title

chore: Android/iOS 릴리즈 빌드 CI 자동화 (AAB/IPA 산출물 추출)(#312)


🎞️ 주요 코드 설명

.github/workflows/release-build.yml 신규 추가

  • main 브랜치에 push될 때 트리거되는 릴리즈 빌드 워크플로우 추가
  • 동일 브랜치에 대해 중복 실행되지 않도록 concurrency 그룹 설정 (cancel-in-progress: true)

Android 빌드 (android-build)

  • pnpm(corepack) 세팅 → 의존성 설치 → 웹 자산 빌드(pnpm build) → npx cap sync android
  • JDK 21, Android SDK 세팅
  • ANDROID_KEYSTORE_BASE64 시크릿을 디코딩해 릴리즈 keystore 복원, keystore.properties 생성
  • gradlew bundleRelease로 릴리즈 AAB 빌드 후 아티팩트로 업로드 (14일 보관)

iOS 빌드 (ios-build)

  • pnpm 세팅 → 의존성 설치 → 웹 자산 빌드 → npx cap sync ios
  • 배포 인증서(p12) / 프로비저닝 프로파일을 시크릿에서 디코딩해 임시 키체인에 임포트
  • xcodebuild archiveExportOptions.plist 생성 → xcodebuild -exportArchive로 IPA 추출 후 아티팩트 업로드 (14일 보관)
  • 작업 종료 시(if: always()) 임시 키체인 정리
  • EXPORT_METHOD는 앱스토어 심사 통과 전이라 현재 development로 설정, 심사 통과 후 app-store로 전환 필요

📌 PR 설명

이번 PR에서 어떤 작업을 했는지 요약해주세요.

  • main push 시 Android 릴리즈 AAB 자동 빌드 워크플로우 추가
  • main push 시 iOS 릴리즈 IPA 자동 빌드 워크플로우 추가 (인증서/프로파일 서명 포함)
  • 빌드 산출물(AAB/IPA)을 GitHub Actions 아티팩트로 업로드하도록 구성
  • github secrets에 키스토어, 인증서, 환경변수 값 등록

📷 스크린샷

UI 변경 없음 (CI 워크플로우 추가)


@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
finders Ready Ready Preview Aug 9, 2026 8:42am

@jeonbinggu jeonbinggu self-assigned this Jul 4, 2026
@jeonbinggu jeonbinggu added the chore 기타 작업(패키지 등) label Jul 4, 2026

@MlNTYS MlNTYS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PRAISE: 수고하셨습니다! 리뷰 확인 부탁드려요!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MUST: 이거 github secrests로 빌드 하려면 env: 으로 명시 참조해야 주입됩니당

Comment thread .github/workflows/release-build.yml Outdated
-archivePath "$RUNNER_TEMP/App.xcarchive" \
-destination "generic/platform=iOS" \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY="Apple Distribution" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

QUESTION: 이거 78번 줄에서 EXPORT_METHOD: development 으로 했는데, 불일치 해도 상관 없나요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

확인해보니 문제가 될 것 같아서 저희는 테스트 플라이트에서 내부 테스트를 하는 용도이기 때문에 EXPORT_METHOD: app-store 로 변경했습니다

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHOULD: 이거 하면서 android 부분에 빌드 버전 자동으로 올리는 것도 같이 하면 좋을 거 같아요!

- env 주입
- keystore 경로
- 빌드번호
FCM 푸시 알림 도입으로 Android 릴리즈 빌드에 google-services.json이
필요해져, 기존 keystore와 동일한 방식(Secret base64 디코딩)으로
android/app/google-services.json을 생성하는 스텝을 추가.
자격증명 파일이라 android/.gitignore에도 추가해 커밋되지 않도록 처리.
jeonbinggu and others added 3 commits August 8, 2026 21:44
Xcode 프로젝트에 리소스로 등록되어 있어 파일이 없으면 Archive가 즉시 실패한다
(Android와 달리 존재 여부를 체크하는 경로가 없음).
public 레포이므로 파일 자체는 gitignore하고 Secret에서 복원한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
develop이 versionCode 4까지 올려둔 상태라 base 2로는 run_number 1~2에서
3, 4가 생성되어 Play Console 업로드가 거부된다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
workflow_dispatch는 기본 브랜치에 있는 워크플로만 노출되어 머지 전에는
실행할 수 없다. 검증 후 되돌릴 커밋.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Capacitor 8 CLI가 NodeJS >=22를 요구해 cap sync가 두 job 모두에서 실패한다.
main.yml은 cap sync를 돌리지 않아 20에서도 통과하던 상태였다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Secret이 비어 있으면 security cms가 "Cannot parse a NULL or zero-length data"
로만 죽어 어느 Secret이 문제인지 로그로 알 수 없다. 바이트 수를 찍고
비정상이면 어떤 Secret을 다시 등록해야 하는지 명시하고 중단한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
프로비저닝 프로파일 Secret 교체 후 검증. 임시 push 트리거와 함께 정리할 커밋.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
크기만으로는 base64 이중 인코딩·잘못된 파일을 구분할 수 없다.
앞 4바이트로 DER 여부를 판별한다. 컨테이너 헤더라 비밀값이 아니다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
키체인 명령들이 한 스텝에 묶여 있어 어느 명령이 실패했는지 로그로 구분되지
않는다. 원인 특정 후 마커는 제거할 것.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
security cms가 정상 DER 프로파일(head=3082, 길이 일치)에도
"Cannot parse a NULL or zero-length data"로 실패해 iOS 빌드가 막혔다.
키체인 명령은 모두 통과한 상태이고 이 명령만 실패한다.
openssl smime으로 CMS 페이로드를 꺼내 도구 의존을 제거한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
xcodebuild 커맨드라인 빌드 설정은 워크스페이스 전체 타깃에 적용된다.
PROVISIONING_PROFILE_SPECIFIER가 Pods 타깃(Alamofire, KakaoSDK 등)에도
걸려 "does not support provisioning profiles"로 아카이브가 실패했다.
커맨드라인 설정은 프로젝트 설정을 덮어쓰므로 Podfile 훅으로는 막을 수 없다.

App 타깃 Release 설정에만 Manual 서명을 지정하고 커맨드라인에서 제거한다.
Debug는 Automatic 그대로라 로컬 개발 빌드는 영향받지 않는다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
release 빌드가 Android/iOS 양쪽 통과(AAB/IPA 산출물 생성)를 확인해 제거한다.
Secret 크기·매직바이트 가드는 실패 시 원인을 즉시 알려주므로 남긴다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore 기타 작업(패키지 등)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants