From e36818fe8dff4276f72caccff8fd14a448f3f7bc Mon Sep 17 00:00:00 2001 From: min486 Date: Sat, 15 Nov 2025 18:35:54 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20Java=2017=EB=A1=9C=20=EC=97=85=EA=B7=B8=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index de771d4..9924ef5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -59,11 +59,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } buildFeatures { compose = true From 57b8bf804572b9616cb9bd5c2d65f662992941fc Mon Sep 17 00:00:00 2001 From: min486 Date: Sat, 15 Nov 2025 23:51:56 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20CI/CD=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20release?= =?UTF-8?q?=20=EC=84=9C=EB=AA=85=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd_release.yml | 60 ++++++++++++++++++++++++++++++++ .github/workflows/ci_build.yml | 38 ++++++++++++++++++++ app/build.gradle.kts | 19 ++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .github/workflows/cd_release.yml create mode 100644 .github/workflows/ci_build.yml diff --git a/.github/workflows/cd_release.yml b/.github/workflows/cd_release.yml new file mode 100644 index 0000000..c12d935 --- /dev/null +++ b/.github/workflows/cd_release.yml @@ -0,0 +1,60 @@ +name: Android CD Release + +on: + push: + branches: + - master # master 브랜치에 push 될 때 실행 + +jobs: + release: + runs-on: ubuntu-latest + + # Secrets를 환경 변수로 정의하여 run 스크립트에서 $변수 형태로 사용 가능 + env: + KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Make gradlew executable + run: chmod +x ./gradlew + + # Secrets에서 Base64 문자열을 디코딩하여 app/keystore.jks 파일로 저장 + - name: Decode Keystore File + # base64 -d 명령어를 사용하여 복호화 + run: echo "$KEYSTORE_BASE64" | base64 -d > app/keystore.jks + + # 서명에 필요한 비밀번호와 별칭 정보를 signing.properties 파일로 생성 + - name: Set up Signing Properties + run: | + echo "storeFile=keystore.jks" > ./signing.properties + echo "storePassword=$KEYSTORE_PASSWORD" >> ./signing.properties + echo "keyAlias=$KEY_ALIAS" >> ./signing.properties + echo "keyPassword=$KEY_PASSWORD" >> ./signing.properties + + # 릴리즈 AAB 빌드 실행 + - name: Build Release AAB + # 프로젝트 설정을 통해 서명된다 + run: ./gradlew bundleRelease + + # GitHub Release 생성 및 고정 메시지 적용 + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + # Git Tag가 푸시될 때만 Release를 생성 (예: v1.0.0) + if: startsWith(github.ref, 'refs/tags/') + with: + # 빌드된 AAB 파일 업로드 + files: app/build/outputs/bundle/release/app-release.aab + name: Release ${{ github.ref_name }} + body: | + 더 나은 모멘토를 위해 버그를 수정하고, 사용성을 개선했어요 \ No newline at end of file diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml new file mode 100644 index 0000000..080adc6 --- /dev/null +++ b/.github/workflows/ci_build.yml @@ -0,0 +1,38 @@ +name: Android CI Build + +on: + push: + branches: + - develop # develop 브랜치에 push 될 때 실행 + pull_request: + branches: + - develop # develop 브랜치로 PR이 열리거나 업데이트 될 때 실행 + + +jobs: + build: + runs-on: ubuntu-latest # 워크플로우를 실행할 가상 환경 + + steps: + - name: Checkout Code + uses: actions/checkout@v4 # GitHub 저장소 코드를 워크스페이스로 가져오기 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Make gradlew executable + run: chmod +x ./gradlew # gradlew 파일에 실행 권한 부여 + + - name: Build Debug APK + run: ./gradlew assembleDebug # 디버그 APK 빌드 명령어 실행 + + # 빌드된 APK 아티팩트 저장 + - name: Upload APK Artifact + uses: actions/upload-artifact@v4 + with: + name: dngo-app-debug + path: app/build/outputs/apk/debug/app-debug.apk + retention-days: 90 \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9924ef5..1626930 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,6 +11,13 @@ if (propertiesFile.exists()) { propertiesFile.inputStream().use { properties.load(it) } } +// CI/CD 서명 설정 파일 로드 +val signingProps = Properties() +val signingPropsFile = project.rootProject.file("signing.properties") +if (signingPropsFile.exists()) { + signingPropsFile.inputStream().use { signingProps.load(it) } +} + plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) @@ -49,6 +56,16 @@ android { buildConfigField("String", "NAVER_CLIENT_SECRET", "\"${naverClientSecret}\"") } + // CI/CD 서명 설정 + signingConfigs { + create("release") { + storeFile = if (signingProps.containsKey("storeFile")) file("app/${signingProps["storeFile"] as String}") else null + storePassword = signingProps["storePassword"] as String? + keyAlias = signingProps["keyAlias"] as String? + keyPassword = signingProps["keyPassword"] as String? + } + } + buildTypes { release { isMinifyEnabled = false @@ -56,6 +73,8 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) + // release 빌드 타입에 서명 설정 적용 + signingConfig = signingConfigs.getByName("release") } } compileOptions { From 11054c934af1c6004d63100a0aa62ce63baf281a Mon Sep 17 00:00:00 2001 From: min486 Date: Sun, 16 Nov 2025 13:15:03 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20CI=20=EB=B9=8C=EB=93=9C=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=20=EC=88=98=EC=A0=95=20(local.properties=EC=97=90=20?= =?UTF-8?q?=ED=82=A4=20=EA=B0=92=20=EC=A3=BC=EC=9E=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci_build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 080adc6..4746cec 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -13,6 +13,11 @@ jobs: build: runs-on: ubuntu-latest # 워크플로우를 실행할 가상 환경 + env: + KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }} + NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }} + NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }} + steps: - name: Checkout Code uses: actions/checkout@v4 # GitHub 저장소 코드를 워크스페이스로 가져오기 @@ -26,6 +31,13 @@ jobs: - name: Make gradlew executable run: chmod +x ./gradlew # gradlew 파일에 실행 권한 부여 + # Secrets를 사용하여 local.properties 파일 생성 + - name: Create local.properties for CI + run: | + echo "kakao.native.app.key=$KAKAO_NATIVE_APP_KEY" > local.properties + echo "naver.client.id=$NAVER_CLIENT_ID" >> local.properties + echo "naver.client.secret=$NAVER_CLIENT_SECRET" >> local.properties + - name: Build Debug APK run: ./gradlew assembleDebug # 디버그 APK 빌드 명령어 실행 From 1aced58ff2f5e52c1762062524fe5914267dd932 Mon Sep 17 00:00:00 2001 From: min486 Date: Sun, 16 Nov 2025 14:22:44 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20Firebase=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=94=94=EC=BD=94=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci_build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 4746cec..80e6fff 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest # 워크플로우를 실행할 가상 환경 env: + GOOGLE_SERVICES_BASE64: ${{ secrets.GOOGLE_SERVICES_BASE64 }} KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }} NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }} NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }} @@ -31,6 +32,9 @@ jobs: - name: Make gradlew executable run: chmod +x ./gradlew # gradlew 파일에 실행 권한 부여 + - name: Decode Google Services File + run: echo "$GOOGLE_SERVICES_BASE64" | base64 -d > app/google-services.json + # Secrets를 사용하여 local.properties 파일 생성 - name: Create local.properties for CI run: |