From 18912cb6b7c4e083821d020ef7c3095f257af62c Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 02:33:41 +0900 Subject: [PATCH 01/10] ci: automate version tags and Firebase distribution --- .../workflows/firebase-app-distribution.yml | 66 +++++++++++++++ .github/workflows/version-tag-on-merge.yml | 83 +++++++++++++++++++ Prezel/app/build.gradle.kts | 15 ++++ Prezel/build.gradle.kts | 1 + Prezel/gradle/libs.versions.toml | 2 + 5 files changed, 167 insertions(+) create mode 100644 .github/workflows/firebase-app-distribution.yml create mode 100644 .github/workflows/version-tag-on-merge.yml diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml new file mode 100644 index 00000000..5d669dda --- /dev/null +++ b/.github/workflows/firebase-app-distribution.yml @@ -0,0 +1,66 @@ +name: Firebase App Distribution + +on: + push: + tags: [ "v*" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + distribute: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: Prezel + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + cache: 'gradle' + cache-dependency-path: | + Prezel/*.gradle* + Prezel/**/gradle-wrapper.properties + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Create local.properties + run: echo "${{ secrets.LOCAL_PROPERTIES_CONTENTS }}" > ./local.properties + + - name: Create google-services.json + run: | + cat <<'EOF' > ./app/google-services.json + ${{ secrets.GOOGLE_SERVICES_JSON }} + EOF + + - name: Prepare version metadata + run: | + echo "ANDROID_VERSION_CODE=${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV" + echo "ANDROID_VERSION_NAME=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV" + + - name: Build Debug APK + run: ./gradlew assembleDebug --build-cache --parallel + + - name: Upload to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1 + with: + appId: ${{ vars.FIREBASE_APP_ID }} + serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} + groups: ${{ vars.FIREBASE_APP_DISTRIBUTION_GROUPS }} + releaseNotes: | + Tag: ${{ github.ref_name }} + Commit: ${{ github.sha }} + Actor: ${{ github.actor }} + Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + file: ./Prezel/app/build/outputs/apk/debug/app-debug.apk diff --git a/.github/workflows/version-tag-on-merge.yml b/.github/workflows/version-tag-on-merge.yml new file mode 100644 index 00000000..315cd9f4 --- /dev/null +++ b/.github/workflows/version-tag-on-merge.yml @@ -0,0 +1,83 @@ +name: Version Tag On Merge + +on: + pull_request: + branches: [ "develop" ] + types: [ "closed" ] + +permissions: + contents: write + +jobs: + tag-version: + if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Determine next version tag + env: + PR_LABELS_JSON: ${{ toJson(github.event.pull_request.labels.*.name) }} + TARGET_SHA: ${{ github.event.pull_request.merge_commit_sha }} + run: | + set -euo pipefail + + git fetch --tags --force + + existing_tag="$(git tag --points-at "$TARGET_SHA" --list 'v*' | sort -V | tail -n 1)" + if [ -n "$existing_tag" ]; then + echo "TAG_NAME=$existing_tag" >> "$GITHUB_ENV" + echo "TAG_ALREADY_EXISTS=true" >> "$GITHUB_ENV" + exit 0 + fi + + bump="patch" + if [[ "$PR_LABELS_JSON" == *'"major"'* ]]; then + bump="major" + elif [[ "$PR_LABELS_JSON" == *'"minor"'* ]]; then + bump="minor" + elif [[ "$PR_LABELS_JSON" == *'"patch"'* ]]; then + bump="patch" + fi + + latest_tag="$(git tag --list 'v*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1 || true)" + latest_tag="${latest_tag:-v0.0.0}" + version="${latest_tag#v}" + + IFS='.' read -r major minor patch <<< "$version" + + case "$bump" in + major) + major=$((major + 1)) + minor=0 + patch=0 + ;; + minor) + minor=$((minor + 1)) + patch=0 + ;; + patch) + patch=$((patch + 1)) + ;; + esac + + echo "TAG_NAME=v${major}.${minor}.${patch}" >> "$GITHUB_ENV" + echo "TAG_ALREADY_EXISTS=false" >> "$GITHUB_ENV" + echo "BUMP_TYPE=$bump" >> "$GITHUB_ENV" + + - name: Create version tag + if: ${{ env.TAG_ALREADY_EXISTS == 'false' }} + env: + TARGET_SHA: ${{ github.event.pull_request.merge_commit_sha }} + run: | + set -euo pipefail + + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + git tag -a "$TAG_NAME" "$TARGET_SHA" -m "Release $TAG_NAME" + git push origin "$TAG_NAME" diff --git a/Prezel/app/build.gradle.kts b/Prezel/app/build.gradle.kts index 7146cf96..f4751910 100644 --- a/Prezel/app/build.gradle.kts +++ b/Prezel/app/build.gradle.kts @@ -2,11 +2,26 @@ plugins { alias(libs.plugins.prezel.android.application.compose) alias(libs.plugins.prezel.hilt) alias(libs.plugins.kotlinx.serialization) + alias(libs.plugins.google.gms.google.services) } +val androidVersionCodeProvider = providers + .gradleProperty("ANDROID_VERSION_CODE") + .orElse(providers.environmentVariable("ANDROID_VERSION_CODE")) + .orElse("1") +val androidVersionNameProvider = providers + .gradleProperty("ANDROID_VERSION_NAME") + .orElse(providers.environmentVariable("ANDROID_VERSION_NAME")) + .orElse("0.1.0") + android { namespace = "com.team.prezel" + defaultConfig { + versionCode = androidVersionCodeProvider.get().toInt() + versionName = androidVersionNameProvider.get() + } + buildTypes { debug { isMinifyEnabled = false diff --git a/Prezel/build.gradle.kts b/Prezel/build.gradle.kts index 80ba2255..df024318 100644 --- a/Prezel/build.gradle.kts +++ b/Prezel/build.gradle.kts @@ -9,6 +9,7 @@ plugins { alias(libs.plugins.detekt) apply true alias(libs.plugins.hilt) apply false alias(libs.plugins.ksp) apply false + alias(libs.plugins.google.gms.google.services) apply false } subprojects { diff --git a/Prezel/gradle/libs.versions.toml b/Prezel/gradle/libs.versions.toml index 695cab9c..27fbe390 100644 --- a/Prezel/gradle/libs.versions.toml +++ b/Prezel/gradle/libs.versions.toml @@ -29,6 +29,7 @@ kotlinxSerialization = "1.9.0" kakao = "2.23.2" lottie = "6.6.7" balloonCompose = "1.7.6" +googleGmsGoogleServices = "4.4.4" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -113,6 +114,7 @@ prezel-android-feature-impl = { id = "prezel.android.feature.impl" } prezel-android-feature-api = { id = "prezel.android.feature.api" } prezel-hilt = { id = "prezel.hilt" } prezel-jvm-library = { id = "prezel.jvm.library" } +google-gms-google-services = { id = "com.google.gms.google-services", version.ref = "googleGmsGoogleServices" } [bundles] android-compose = [ From 8d1d8f6e32620681e016b14f5dff8186fff993bc Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 02:35:05 +0900 Subject: [PATCH 02/10] ci: inject google services config in PR builds --- .github/workflows/android-pr-ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android-pr-ci.yaml b/.github/workflows/android-pr-ci.yaml index 34d1da9b..5070f801 100644 --- a/.github/workflows/android-pr-ci.yaml +++ b/.github/workflows/android-pr-ci.yaml @@ -38,6 +38,12 @@ jobs: - name: Create local.properties run: echo "${{ secrets.LOCAL_PROPERTIES_CONTENTS }}" > ./local.properties + - name: Create google-services.json + run: | + cat <<'EOF' > ./app/google-services.json + ${{ secrets.GOOGLE_SERVICES_JSON }} + EOF + - name: Run Ktlint run: ./gradlew ktlintCheck --build-cache --parallel From f74ea607ed8fa893510cb0bbf067815a2de31096 Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 02:41:40 +0900 Subject: [PATCH 03/10] ci: notify Discord on distribution results --- .../workflows/firebase-app-distribution.yml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index 5d669dda..38015e14 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -64,3 +64,52 @@ jobs: Actor: ${{ github.actor }} Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} file: ./Prezel/app/build/outputs/apk/debug/app-debug.apk + + - name: Send Discord Notification + if: always() + env: + DISCORD_WEBHOOK: ${{ secrets.DISTRIBUTION_DISCORD_HOOK_URL }} + STATUS_TITLE: ${{ job.status == 'success' && '✅ Firebase Debug 배포 성공' || '❌ Firebase Debug 배포 실패' }} + STATUS_COLOR: ${{ job.status == 'success' && '3066993' || '15158332' }} + BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + EVENT_TIMESTAMP: ${{ github.event.head_commit.timestamp || github.event.repository.pushed_at }} + run: | + if [ -z "$DISCORD_WEBHOOK" ]; then + echo "DISTRIBUTION_DISCORD_HOOK_URL is not set. Skipping Discord notification." + exit 0 + fi + + curl -H "Content-Type: application/json" -X POST -d "$(cat <" + }, + { + "name": "👥 Tester Group", + "value": "${{ vars.FIREBASE_APP_DISTRIBUTION_GROUPS }}" + }, + { + "name": "🔗 Action Log", + "value": "[바로가기]($BUILD_URL)" + } + ], + "footer": { + "text": "Prezel Firebase Distribution" + }, + "timestamp": "$EVENT_TIMESTAMP" + } + ] + } + EOF + )" "$DISCORD_WEBHOOK" From 61f8bf4cfec1f3a9a894abac5ab51378ccf8568b Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 03:10:00 +0900 Subject: [PATCH 04/10] =?UTF-8?q?ci:=20Firebase=20=EC=95=B1=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=ED=99=94=20=EB=B0=8F=20=EC=97=B0=EB=8F=99=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **refactor: `firebase-app-distribution.yml` 트리거 및 빌드 로직 수정** * 워크플로우 트리거 방식을 기존 태그 푸시(`push: tags`)에서 수동 및 외부 호출(`workflow_dispatch`) 방식으로 변경했습니다. * `tag_name`을 입력 파라미터로 받아 특정 태그를 체크아웃하고 빌드하도록 수정했습니다. * 앱 버전명(`ANDROID_VERSION_NAME`)과 릴리스 노트의 태그 정보를 입력받은 `DISTRIBUTION_TAG` 기반으로 생성하도록 개선했습니다. * **feat: `version-tag-on-merge.yml` 내 배포 자동화 로직 추가** * 태그 생성 완료 후 Firebase 배포 워크플로우를 자동으로 실행하는 디스패치(Dispatch) 단계를 추가했습니다. * 워크플로우 실행을 위해 `actions: write` 권한을 추가하고 `github-script`를 사용하여 `firebase-app-distribution.yml`을 호출합니다. --- .../workflows/firebase-app-distribution.yml | 19 +++++++++----- .github/workflows/version-tag-on-merge.yml | 25 ++++++++++++++++--- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index 38015e14..a5a69eaf 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -1,11 +1,15 @@ name: Firebase App Distribution on: - push: - tags: [ "v*" ] + workflow_dispatch: + inputs: + tag_name: + description: Distribution tag to build from + required: true + type: string concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ inputs.tag_name || github.ref }} cancel-in-progress: true jobs: @@ -21,6 +25,7 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 + ref: ${{ inputs.tag_name }} - name: Set up JDK 21 uses: actions/setup-java@v5 @@ -46,8 +51,10 @@ jobs: - name: Prepare version metadata run: | + DISTRIBUTION_TAG="${{ inputs.tag_name }}" + echo "DISTRIBUTION_TAG=$DISTRIBUTION_TAG" >> "$GITHUB_ENV" echo "ANDROID_VERSION_CODE=${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV" - echo "ANDROID_VERSION_NAME=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV" + echo "ANDROID_VERSION_NAME=${DISTRIBUTION_TAG#v}" >> "$GITHUB_ENV" - name: Build Debug APK run: ./gradlew assembleDebug --build-cache --parallel @@ -59,7 +66,7 @@ jobs: serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} groups: ${{ vars.FIREBASE_APP_DISTRIBUTION_GROUPS }} releaseNotes: | - Tag: ${{ github.ref_name }} + Tag: ${{ env.DISTRIBUTION_TAG }} Commit: ${{ github.sha }} Actor: ${{ github.actor }} Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} @@ -89,7 +96,7 @@ jobs: "fields": [ { "name": "🏷 Tag", - "value": "${{ github.ref_name }}" + "value": "${{ env.DISTRIBUTION_TAG }}" }, { "name": "📦 Version", diff --git a/.github/workflows/version-tag-on-merge.yml b/.github/workflows/version-tag-on-merge.yml index 315cd9f4..189ce80a 100644 --- a/.github/workflows/version-tag-on-merge.yml +++ b/.github/workflows/version-tag-on-merge.yml @@ -4,13 +4,16 @@ on: pull_request: branches: [ "develop" ] types: [ "closed" ] + push: + branches: [ "fix/firebase-distribution" ] permissions: + actions: write contents: write jobs: tag-version: - if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' }} + if: ${{ github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') }} runs-on: ubuntu-latest steps: @@ -21,8 +24,8 @@ jobs: - name: Determine next version tag env: - PR_LABELS_JSON: ${{ toJson(github.event.pull_request.labels.*.name) }} - TARGET_SHA: ${{ github.event.pull_request.merge_commit_sha }} + PR_LABELS_JSON: ${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.labels.*.name) || '[]' }} + TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.merge_commit_sha || github.sha }} run: | set -euo pipefail @@ -72,7 +75,7 @@ jobs: - name: Create version tag if: ${{ env.TAG_ALREADY_EXISTS == 'false' }} env: - TARGET_SHA: ${{ github.event.pull_request.merge_commit_sha }} + TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.merge_commit_sha || github.sha }} run: | set -euo pipefail @@ -81,3 +84,17 @@ jobs: git tag -a "$TAG_NAME" "$TARGET_SHA" -m "Release $TAG_NAME" git push origin "$TAG_NAME" + + - name: Dispatch Firebase distribution workflow + uses: actions/github-script@v8 + with: + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: "firebase-app-distribution.yml", + ref: context.ref.replace("refs/heads/", ""), + inputs: { + tag_name: process.env.TAG_NAME, + }, + }); From 911bcc9cc0ba71257d94652895dc10f34ecab902 Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 12:01:27 +0900 Subject: [PATCH 05/10] =?UTF-8?q?build:=20=EB=A6=B4=EB=A6=AC=EC=8A=A4=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=84=9C=EB=AA=85=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20Firebase=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **build: `app` 모듈 내 릴리스 서명(Signing Config) 구성** * `gradleLocalProperties`를 사용하여 `local.properties`에 정의된 키스토어 정보(파일 경로, 비밀번호, 별칭)를 불러오도록 설정했습니다. * `release` 빌드 타입에 릴리스 서명 설정을 적용했습니다. * `release` 빌드 타입에서 `isMinifyEnabled`와 `isShrinkResources`를 `false`로 변경했습니다. * **ci: Firebase App Distribution 대상을 Debug에서 Release로 변경** * GitHub Actions 워크플로우 내 빌드 태스크를 `assembleDebug`에서 `assembleRelease`로 수정했습니다. * 빌드 전 GitHub Secrets의 `ANDROID_KEYSTORE_BASE64`를 디코딩하여 릴리스 키스토어 파일(`.jks`)을 생성하는 단계를 추가했습니다. * 배포 결과물 경로를 `app-release.apk`로 업데이트하고, Discord 알림 메시지의 문구를 배포 환경에 맞춰 수정했습니다. * **chore: `.gitignore` 서명 관련 파일 제외 설정** * 키스토어 파일 유출 방지를 위해 `*.jks` 및 `*.keystore` 패턴을 `.gitignore`에 추가했습니다. --- .../workflows/firebase-app-distribution.yml | 14 +++++++++----- Prezel/.gitignore | 3 ++- Prezel/app/build.gradle.kts | 18 ++++++++++++++++-- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index a5a69eaf..3b064bb5 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -49,6 +49,10 @@ jobs: ${{ secrets.GOOGLE_SERVICES_JSON }} EOF + - name: Create Android release keystore + run: | + echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./app/release-keystore.jks + - name: Prepare version metadata run: | DISTRIBUTION_TAG="${{ inputs.tag_name }}" @@ -56,8 +60,8 @@ jobs: echo "ANDROID_VERSION_CODE=${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV" echo "ANDROID_VERSION_NAME=${DISTRIBUTION_TAG#v}" >> "$GITHUB_ENV" - - name: Build Debug APK - run: ./gradlew assembleDebug --build-cache --parallel + - name: Build Release APK + run: ./gradlew assembleRelease --build-cache --parallel - name: Upload to Firebase App Distribution uses: wzieba/Firebase-Distribution-Github-Action@v1 @@ -70,13 +74,13 @@ jobs: Commit: ${{ github.sha }} Actor: ${{ github.actor }} Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - file: ./Prezel/app/build/outputs/apk/debug/app-debug.apk + file: ./Prezel/app/build/outputs/apk/release/app-release.apk - name: Send Discord Notification if: always() env: DISCORD_WEBHOOK: ${{ secrets.DISTRIBUTION_DISCORD_HOOK_URL }} - STATUS_TITLE: ${{ job.status == 'success' && '✅ Firebase Debug 배포 성공' || '❌ Firebase Debug 배포 실패' }} + STATUS_TITLE: ${{ job.status == 'success' && '✅ Firebase Release 배포 성공' || '❌ Firebase Release 배포 실패' }} STATUS_COLOR: ${{ job.status == 'success' && '3066993' || '15158332' }} BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} EVENT_TIMESTAMP: ${{ github.event.head_commit.timestamp || github.event.repository.pushed_at }} @@ -91,7 +95,7 @@ jobs: "embeds": [ { "title": "$STATUS_TITLE", - "description": "Firebase Distribution Debug APK 배포가 완료되었습니다.", + "description": "Firebase Distribution Release APK 배포가 완료되었습니다.", "color": $STATUS_COLOR, "fields": [ { diff --git a/Prezel/.gitignore b/Prezel/.gitignore index 327e5f4f..3374490a 100644 --- a/Prezel/.gitignore +++ b/Prezel/.gitignore @@ -12,6 +12,7 @@ /captures .externalNativeBuild .cxx -local.properties +*.jks +*.keystore .agents/ skills-lock.json diff --git a/Prezel/app/build.gradle.kts b/Prezel/app/build.gradle.kts index f4751910..4e56ad85 100644 --- a/Prezel/app/build.gradle.kts +++ b/Prezel/app/build.gradle.kts @@ -1,3 +1,5 @@ +import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties + plugins { alias(libs.plugins.prezel.android.application.compose) alias(libs.plugins.prezel.hilt) @@ -22,6 +24,17 @@ android { versionName = androidVersionNameProvider.get() } + signingConfigs { + create("release") { + val localProperties = gradleLocalProperties(rootDir, providers) + + storeFile = rootProject.file(localProperties.getProperty("signed.store.file")) + storePassword = localProperties.getProperty("signed.store.password") + keyAlias = localProperties.getProperty("signed.key.alias") + keyPassword = localProperties.getProperty("signed.key.password") + } + } + buildTypes { debug { isMinifyEnabled = false @@ -30,8 +43,9 @@ android { } release { - isMinifyEnabled = true - isShrinkResources = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("release") proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", From 922669c83b59c0e7c318625ae0e03fea7c862e0c Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 12:19:04 +0900 Subject: [PATCH 06/10] =?UTF-8?q?ci:=20GitHub=20Actions=20=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EB=82=B4=20=ED=82=A4?= =?UTF-8?q?=EC=8A=A4=ED=86=A0=EC=96=B4=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **ci: Firebase App Distribution 워크플로우 내 키스토어 경로 변경** * 생성되는 키스토어 파일 이름을 `release-keystore.jks`에서 `keystore.jks`로 수정했습니다. --- .github/workflows/firebase-app-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index 3b064bb5..b93062c4 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -51,7 +51,7 @@ jobs: - name: Create Android release keystore run: | - echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./app/release-keystore.jks + echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./app/keystore.jks - name: Prepare version metadata run: | From dc1be6c50ed7e2289d5ca46204619a9f1d558652 Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 12:32:48 +0900 Subject: [PATCH 07/10] =?UTF-8?q?build:=20=EC=95=B1=20ID=20=EB=B0=8F=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=8F=99=EC=A0=81=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20CI=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **build: `build.gradle.kts` 내 앱 ID 및 이름 동적 주입 로직 구현** * Gradle 속성 또는 환경 변수(`APP_APPLICATION_ID`, `APP_NAME`)로부터 값을 주입받는 Provider를 추가했습니다. * 주입받은 값을 `defaultConfig`의 `applicationId`에 적용하고, `release` 빌드 타입에서 `app_name` 리소스 값을 동적으로 생성하도록 설정했습니다. * 환경 변수가 없을 경우 사용될 기본값(`com.team.prezel`, `Prezel`)을 정의했습니다. * **ci: Firebase App Distribution 워크플로우 설정 업데이트** * 내부 테스트 배포용 앱 구분을 위해 `APP_APPLICATION_ID`를 `com.team.prezel.internal`로, `APP_NAME`을 `Prezel (Internal)`로 설정하는 환경 변수를 추가했습니다. * Android 릴리스 키스토어 생성 경로를 `./app/keystore.jks`에서 루트 디렉토리인 `./keystore.jks`로 변경했습니다. --- .github/workflows/firebase-app-distribution.yml | 4 +++- Prezel/app/build.gradle.kts | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index b93062c4..c532535e 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -51,7 +51,7 @@ jobs: - name: Create Android release keystore run: | - echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./app/keystore.jks + echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./keystore.jks - name: Prepare version metadata run: | @@ -59,6 +59,8 @@ jobs: echo "DISTRIBUTION_TAG=$DISTRIBUTION_TAG" >> "$GITHUB_ENV" echo "ANDROID_VERSION_CODE=${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV" echo "ANDROID_VERSION_NAME=${DISTRIBUTION_TAG#v}" >> "$GITHUB_ENV" + echo "APP_APPLICATION_ID=com.team.prezel.internal" >> "$GITHUB_ENV" + echo "APP_NAME=Prezel (Internal)" >> "$GITHUB_ENV" - name: Build Release APK run: ./gradlew assembleRelease --build-cache --parallel diff --git a/Prezel/app/build.gradle.kts b/Prezel/app/build.gradle.kts index 4e56ad85..96e9b80f 100644 --- a/Prezel/app/build.gradle.kts +++ b/Prezel/app/build.gradle.kts @@ -15,11 +15,20 @@ val androidVersionNameProvider = providers .gradleProperty("ANDROID_VERSION_NAME") .orElse(providers.environmentVariable("ANDROID_VERSION_NAME")) .orElse("0.1.0") +val appApplicationIdProvider = providers + .gradleProperty("APP_APPLICATION_ID") + .orElse(providers.environmentVariable("APP_APPLICATION_ID")) + .orElse("com.team.prezel") +val appNameProvider = providers + .gradleProperty("APP_NAME") + .orElse(providers.environmentVariable("APP_NAME")) + .orElse("Prezel") android { namespace = "com.team.prezel" defaultConfig { + applicationId = appApplicationIdProvider.get() versionCode = androidVersionCodeProvider.get().toInt() versionName = androidVersionNameProvider.get() } @@ -45,6 +54,7 @@ android { release { isMinifyEnabled = false isShrinkResources = false + resValue("string", "app_name", appNameProvider.get()) signingConfig = signingConfigs.getByName("release") proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), From da23692256ed298a844de9dca5ae70b20b6f6e5c Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 12:37:52 +0900 Subject: [PATCH 08/10] =?UTF-8?q?build:=20Firebase=20App=20Distribution?= =?UTF-8?q?=EC=9A=A9=20Application=20ID=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **build: Firebase App Distribution 워크플로우 내 Application ID 변경** * `APP_APPLICATION_ID` 환경 변수 값을 `com.team.prezel.internal`에서 `com.team.prezel.dev`로 수정했습니다. --- .github/workflows/firebase-app-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index c532535e..3dcdc6c7 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -59,7 +59,7 @@ jobs: echo "DISTRIBUTION_TAG=$DISTRIBUTION_TAG" >> "$GITHUB_ENV" echo "ANDROID_VERSION_CODE=${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV" echo "ANDROID_VERSION_NAME=${DISTRIBUTION_TAG#v}" >> "$GITHUB_ENV" - echo "APP_APPLICATION_ID=com.team.prezel.internal" >> "$GITHUB_ENV" + echo "APP_APPLICATION_ID=com.team.prezel.dev" >> "$GITHUB_ENV" echo "APP_NAME=Prezel (Internal)" >> "$GITHUB_ENV" - name: Build Release APK From 2d696fc4310f56969a38d619ae8bc04de0835b18 Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 12:46:14 +0900 Subject: [PATCH 09/10] =?UTF-8?q?build:=20Firebase=20App=20Distribution=20?= =?UTF-8?q?=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EB=82=B4=20?= =?UTF-8?q?=ED=82=A4=EC=8A=A4=ED=86=A0=EC=96=B4=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **build: Android 릴리스 키스토어 생성 파일명 수정** * GitHub Actions 워크플로우에서 디코딩된 키스토어 파일의 이름을 `keystore.jks`에서 `prezel.jks`로 변경했습니다. --- .github/workflows/firebase-app-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-app-distribution.yml b/.github/workflows/firebase-app-distribution.yml index 3dcdc6c7..0fa3bd4a 100644 --- a/.github/workflows/firebase-app-distribution.yml +++ b/.github/workflows/firebase-app-distribution.yml @@ -51,7 +51,7 @@ jobs: - name: Create Android release keystore run: | - echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./keystore.jks + echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > ./prezel.jks - name: Prepare version metadata run: | From b13689b250532170796e868d9c6e85cd682ad80e Mon Sep 17 00:00:00 2001 From: moondev03 Date: Mon, 1 Jun 2026 13:05:50 +0900 Subject: [PATCH 10/10] =?UTF-8?q?build:=20CI=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=20=ED=8A=B8=EB=A6=AC=EA=B1=B0=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **ci: 불필요한 push 이벤트 트리거 제거** * `version-tag-on-merge.yml` 워크플로 구성에서 `fix/firebase-distribution` 브랜치에 설정되어 있던 `push` 트리거를 삭제했습니다. --- .github/workflows/version-tag-on-merge.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/version-tag-on-merge.yml b/.github/workflows/version-tag-on-merge.yml index 189ce80a..fb595795 100644 --- a/.github/workflows/version-tag-on-merge.yml +++ b/.github/workflows/version-tag-on-merge.yml @@ -4,8 +4,6 @@ on: pull_request: branches: [ "develop" ] types: [ "closed" ] - push: - branches: [ "fix/firebase-distribution" ] permissions: actions: write