Skip to content

Conversation

@kangyuri1114
Copy link
Member

@kangyuri1114 kangyuri1114 commented Dec 2, 2025

Summary

Firebase App Distribution 세팅 및 구현

Describe your changes

Screenshot 2025-11-30 at 9 58 30 PM

Android CI는 아래 둘 중 하나일 때만 실제 실행됩니다.

  1. develop 브랜치에 push
  2. develop으로 향하는 PR 중, 소스 브랜치가 release/*

Firebase App Distribution 워크플로우가 “실행 후보”가 되는 조건

  1. Android CI가 실행되었고
  2. 실행된 브랜치가 release
  3. Android CI가 완료(completed)

Firebase App Distribution이 실행되면 수행하는 작업 과정

  1. Android CI에서 생성한 artifact 다운로드 (Debug APK, Release APK)
  2. Firebase CLI 설치
  3. Firebase App Distribution 업로드 (Release, Debug 각각 메일 발송: 2개 발송됨)

Issue

  • Resolves #

To reviewers

github workflow - android.yml 업데이트 됐습니다, qa_apk_firebase.yml 파일 추가와 동시에 관련 github secrets가 업데이트 됐습니다

그리고 CLI 방식으로 진행하기 위한 firebase token을 발급할 때는 제 개인 firebase계정의 잇슈 권한으로 발급 받은거라
아마 제가 나중에 잇슈 firebase에서 추방된다면 동작하지 않을 것 같아요
그래서 발급받는 법을 노션에 정리해두었습니다.

https://www.notion.so/eat-ssu/FIREBASE_CI_TOKEN-2d2eeef75a168024955dc5d4fc2cc576?source=copy_link

@kangyuri1114 kangyuri1114 requested review from HI-JIN2 and PeraSite and removed request for HI-JIN2 December 2, 2025 15:05
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kangyuri1114, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 Firebase App Distribution을 프로젝트에 통합하여 애플리케이션의 릴리스 APK를 효율적으로 배포할 수 있도록 합니다. 특히 디버그 빌드에 대한 자동 배포 설정을 포함하며, 향후 GitHub Actions를 통한 자동화된 배포 워크플로우 구축의 기반을 마련합니다.

Highlights

  • Firebase App Distribution 설정: 릴리스 APK 배포를 위한 Firebase App Distribution 플러그인 및 관련 설정을 추가했습니다.
  • Gradle 빌드 스크립트 업데이트: app/build.gradle.kts 및 build.gradle.kts 파일에 Firebase App Distribution 플러그인을 적용하고, 빌드 타입(release, debug) 설정을 getByName() 메서드를 사용하도록 변경했습니다.
  • 디버그 빌드 타입 배포 구성: 디버그 빌드 타입에 Firebase App Distribution 설정을 추가하여 서비스 자격 증명 파일 경로, 아티팩트 유형, 배포 그룹 및 릴리스 노트를 정의했습니다.
  • serviceAccountKey.json 파일 요구사항: Firebase App Distribution을 위해 프로젝트 루트 경로에 serviceAccountKey.json 파일이 필요하며, 이는 Notion 문서에 설명된 대로 추가되어야 합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@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

Firebase App Distribution 설정 추가를 확인했습니다. 이번 PR을 통해 디버그 빌드를 QA 그룹에 쉽게 배포할 수 있게 되었네요.

한 가지 중요한 보안 관련 피드백을 app/build.gradle.kts 파일에 남겼습니다. 서비스 계정 키와 같은 민감한 정보를 안전하게 관리하는 것은 매우 중요하므로, 제안드린 내용을 꼭 확인해주시기 바랍니다. 이 부분을 수정하면 더 안전하고 견고한 배포 프로세스를 구축할 수 있을 것입니다.

Comment on lines 89 to 97
firebaseAppDistribution {
serviceCredentialsFile = "$rootDir/serviceAccountKey.json"
artifactType = "APK"
groups = "eat-ssu-android-qa"
releaseNotes = """
Debug 빌드 - 버전 ${defaultConfig.versionName} (${defaultConfig.versionCode})
내부 테스트용 빌드입니다.
""".trimIndent()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

serviceAccountKey.json 파일의 경로를 하드코딩하는 것은 심각한 보안 위험을 초래할 수 있습니다. 이 파일이 실수로 Git 저장소에 커밋되면 Firebase 프로젝트에 대한 전체 액세스 권한이 노출될 수 있습니다.

CI/CD 환경과 로컬 개발 환경 모두에서 안전하게 인증 정보를 관리하는 것이 중요합니다.

개선 제안 (CI/CD 우선):
아래와 같이 serviceCredentials 프로퍼티를 사용하여 환경 변수로부터 직접 인증 정보를 읽어오도록 수정하는 것을 권장합니다. 이는 GitHub Actions과 같은 CI/CD 환경에서 GitHub Secrets를 활용하는 가장 안전한 방법입니다.

로컬에서 빌드할 경우, local.properties에 파일 경로를 지정하고 빌드 스크립트에서 해당 경로를 읽어 사용하도록 구성할 수 있습니다. 제안된 코드는 CI/CD 환경에 최적화되어 있으며, 로컬 빌드와의 호환성을 위해서는 추가적인 로직이 필요할 수 있습니다. 예를 들어, 환경 변수가 없을 때 local.properties에서 경로를 읽어오도록 분기 처리를 할 수 있습니다.

            firebaseAppDistribution {
                // GitHub Secrets 등 보안 저장소의 서비스 계정 정보를 환경 변수(예: FIREBASE_CREDENTIALS)로 받아 사용합니다.
                // 이 방법은 민감한 정보를 소스 코드에서 분리하여 보안을 강화합니다.
                serviceCredentials = System.getenv("FIREBASE_CREDENTIALS")
                artifactType = "APK"
                groups = "eat-ssu-android-qa"
                releaseNotes = """
                    Debug 빌드 - 버전 ${defaultConfig.versionName} (${defaultConfig.versionCode})
                    내부 테스트용 빌드입니다.
                """.trimIndent()
            }

Copy link
Member Author

Choose a reason for hiding this comment

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

이거 적용해볼게요

@kangyuri1114 kangyuri1114 marked this pull request as draft December 2, 2025 15:07
@kangyuri1114 kangyuri1114 marked this pull request as ready for review December 2, 2025 15:53
@kangyuri1114 kangyuri1114 requested a review from HI-JIN2 December 2, 2025 16:01
@kangyuri1114 kangyuri1114 self-assigned this Dec 2, 2025
Copy link
Member

@HI-JIN2 HI-JIN2 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~~ 🎉
근데 트리거가 되는게 안드로이드 ci가 돌때마다 테스트 버전 배포가 되는건가요???

릴리즈 브랜치의 ci가 돌았을때만 트리거 해도 되지 않을까요?

디벨롭 <- 피쳐/픽스 머지머지

디벨롭 기준으로 릴리즈 브랜치 생성

릴리즈 브랜치에서 일어난 일은 hotfix 브랜치에서 작업 후 릴리즈 브랜치로 머지  

이렇게 되면 릴리즈 브랜치만 트리거해도 의도대로 다 동작할 수 있을 것 같아요!

@kangyuri1114 kangyuri1114 force-pushed the feat/set-firebase-app-distribution branch from 9a523ed to 53364be Compare December 23, 2025 14:34
@kangyuri1114 kangyuri1114 changed the title feat: Firebase App Distribution 세팅 및 구현 - release APK feat: Firebase App Distribution 세팅 및 구현 - CLI Dec 23, 2025
@kangyuri1114
Copy link
Member Author

kangyuri1114 commented Dec 23, 2025

진님의 워크플로우 트리거 방식이 맞는 방향같아서 수정하다가요!
gradle코드 작성없이 cli로 작동하는 방법이 따로 동작하는 걸 알았습니다! 그러면 gradle이랑 ci 작업을 둘 다 할 필요가 없는 것 같아 gradle 방식은 삭제하고 cli 방식으로 전환했습니다. 그래서 코드리뷰를 다시 부탁드립니다. 🙇🏼‍♀️🙇🏼‍♀️🙇🏼‍♀️

관련 커밋 : 33fdfb5

Android CI는 아래 둘 중 하나일 때만 실제 실행됩니다.

  1. develop 브랜치에 push
  2. develop으로 향하는 PR 중, 소스 브랜치가 release/*

Firebase App Distribution 워크플로우가 “실행 후보”가 되는 조건

  1. Android CI가 실행되었고
  2. 실행된 브랜치가 release
  3. Android CI가 완료(completed)

Firebase App Distribution이 실행되면 수행하는 작업 과정

  1. Android CI에서 생성한 artifact 다운로드 (Debug APK, Release APK)
  2. Firebase CLI 설치
  3. Firebase App Distribution 업로드 (Release, Debug 각각 메일 발송: 2개 발송됨)

@kangyuri1114 kangyuri1114 requested a review from HI-JIN2 December 23, 2025 16:41
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.

3 participants