Skip to content

Conversation

@HI-JIN2
Copy link
Member

@HI-JIN2 HI-JIN2 commented Dec 30, 2025

Summary

fastlane을 이용한 배포 자동화를 구현했습니다.

Describe your changes

일반 개발 워크플로우

기능 개발
    ↓
develop 브랜치에 push
    ↓
[자동 실행]
    └─ CI 빌드 (ci_build)

Release 배포 워크플로우

release/3.2.0 브랜치 생성
    ↓
버전 정보 업데이트 (build.gradle.kts)
    ↓
RELEASE_NOTES.txt 파일 작성 (Play Store 릴리즈 노트)
    ↓
develop로 PR 생성
    ↓
PR 머지
    ↓
[자동 실행]
    ├─ 버전 추출 (3.2.0)
    ├─ 이전 태그 찾기 (v3.1.0)
    ├─ RELEASE_NOTES.txt 파일 확인
    ├─ AAB 빌드 (Production)
    ├─ Play Store 배포 (RELEASE_NOTES.txt 사용)
    ├─ GitHub Release 생성 (자동 릴리즈 노트)
    ├─ Git 태그 생성 (v3.2.0)
    └─ Slack 알림

Issue

To reviewers

@HI-JIN2 HI-JIN2 self-assigned this Dec 30, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @HI-JIN2, 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!

이 Pull Request는 Android 프로젝트의 빌드 및 배포 프로세스를 자동화하기 위해 Fastlane을 통합합니다. 이를 통해 개발 환경 설정, 다양한 빌드 유형 생성(디버그 APK, 릴리즈 AAB), 그리고 Google Play Store로의 배포 과정을 효율적으로 관리할 수 있게 되어, 전반적인 CI/CD 파이프라인의 견고함과 생산성을 향상시킵니다.

Highlights

  • Fastlane 배포 자동화 도입: Android 프로젝트에 Fastlane을 활용한 빌드 및 배포 자동화 시스템이 새롭게 추가되었습니다.
  • 환경 설정 및 빌드 스크립트: Fastlane의 Gemfile, Appfile, Fastfile이 추가되어 환경 변수 설정, 디버그/릴리즈 APK/AAB 빌드, QA 빌드, Play Store 배포 등의 자동화된 워크플로우를 정의합니다.
  • .gitignore 업데이트: Fastlane 관련 파일 및 민감 정보(예: google-services.json, kakao_string.xml)를 .gitignore에서 제외하고, 빌드 아티팩트 및 Fastlane 생성 파일을 무시하도록 업데이트되었습니다.
  • README.md 문서화: Fastlane을 이용한 CI/CD 설정 및 사용 방법에 대한 상세한 가이드가 README.md에 추가되어 개발자들이 쉽게 활용할 수 있도록 했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/fastlane.yml
    • .github/workflows/release_tag.yml
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

fastlane을 이용한 배포 자동화 구현을 위한 PR 잘 보았습니다. CI/CD 파이프라인을 구축하여 개발 생산성을 높이려는 좋은 시도입니다. 특히 환경 변수를 사용하여 민감한 정보를 관리하는 부분은 훌륭합니다. 다만, 몇 가지 개선할 점이 있어 리뷰를 남깁니다. .gitignore 파일 설정에서 민감한 파일이 버전 관리에 포함될 수 있는 위험이 발견되었고, Fastfile의 안정성과 보안을 높일 수 있는 몇 가지 제안을 포함했습니다. 자세한 내용은 각 파일의 코멘트를 확인해주세요.

I am having trouble creating individual review comments. Click here to see my feedback.

.gitignore (30-31)

critical

app/google-services.json 파일과 app/src/main/res/values/kakao_string.xml 파일은 민감한 정보를 포함할 수 있으므로 .gitignore에서 제거하면 안 됩니다. 특히 app/google-services.json은 Fastlane의 setup_google_services lane에 의해 동적으로 생성되므로, 버전 관리에 포함될 경우 빌드 충돌이나 심각한 보안 문제를 야기할 수 있습니다. 이 변경 사항을 되돌리는 것을 강력히 권장합니다.

fastlane/Fastfile (122-138)

high

deploy_internal_test lane에서 생성하는 임시 서비스 계정 JSON 파일(service_account_path)이 upload_to_play_store 액션 실패 시 삭제되지 않을 수 있습니다. 이는 민감한 정보가 빌드 서버에 남아있을 수 있는 보안 약점으로 이어질 수 있습니다. release lane에서처럼 begin...ensure 블록을 사용하여 파일이 항상 삭제되도록 보장하는 것이 좋습니다.

      service_account_path = "/tmp/google-play-service-account.json"
      begin
        File.write(service_account_path, ENV["GOOGLE_PLAY_SERVICE_ACCOUNT_JSON"])

        upload_to_play_store(
          track: track,
          aab: aab_path,
          json_key: service_account_path,
          skip_upload_apk: true,
          skip_upload_metadata: true,
          skip_upload_images: true,
          skip_upload_screenshots: true
        )

        UI.success("✅ Play Store #{track} 트랙에 배포 완료")
      ensure
        # 임시 파일 삭제
        File.delete(service_account_path) if File.exist?(service_account_path)
      end

.gitignore (98-101)

medium

.DS_Store 파일은 macOS에서 자동으로 생성되는 시스템 파일이며, 프로젝트와 직접적인 관련이 없습니다. 버전 관리에서 제외하여 저장소를 깨끗하게 유지하는 것이 좋습니다. 이 파일들을 .gitignore에 다시 포함시켜 주세요.

.gitignore (39-48)

medium

.idea/ 디렉토리 전체를 무시하도록 설정하는 것이 더 간단하고 일반적인 방법입니다. 현재 설정은 .idea/를 포함하면서도 그 안의 특정 파일들을 개별적으로 나열하고 있어 중복되고 혼란을 줄 수 있습니다. 대부분의 경우 .idea/ 한 줄만으로 충분합니다. 팀원 간에 공유해야 할 특정 설정 파일이 있다면 !.idea/shared.xml과 같이 예외 처리를 하는 것이 좋습니다.

.idea/

README.md (103)

medium

릴리즈 예시 브랜치 이름에 3.2.0과 같이 특정 버전이 하드코딩되어 있습니다. 이 문서는 계속 사용될 것이므로 release/<version> 또는 release/x.y.z와 같이 일반적인 형태로 변경하는 것이 좋겠습니다.

`release/<version>` 브랜치를 `develop`에 머지하면 자동으로:

fastlane/Fastfile (28-35)

medium

File.open과 여러 f.puts를 사용하여 local.properties 파일을 작성하는 대신, 배열에 모든 속성을 담고 File.writejoin을 사용하여 한 번에 파일에 쓰는 것이 더 깔끔하고 가독성이 좋습니다.

    properties = [
      "DEV_BASE_URL=\"#{dev_base_url}\"",
      "PROD_BASE_URL=\"#{prod_base_url}\"",
      "KAKAO_NATIVE_APP_KEY=#{kakao_key}",
      "NAVER_MAPS_CLIENT_ID=#{naver_maps_id}",
      "POSTHOG_API_KEY=#{posthog_api_key}",
      "POSTHOG_HOST=#{posthog_host}"
    ]
    File.write("local.properties", properties.join("\n") + "\n")

fastlane/Fastfile (168-169)

medium

grepsed를 사용하여 build.gradle.kts 파일에서 버전 정보를 파싱하는 방식은 파일 구조가 약간만 변경되어도 쉽게 깨질 수 있어 불안정합니다. 더 안정적인 방법으로, 버전 정보를 출력하는 별도의 Gradle 태스크를 만들고 Fastlane에서 해당 태스크를 호출하거나, fastlane-plugin-gradle_properties_parser와 같은 플러그인을 사용하는 것을 고려해 보세요.

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.

[CICD] Fastlane

2 participants