From 170023b501433af39028f7c005abb3f3e78ca15a Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 10:36:25 +0900 Subject: [PATCH 01/10] :sparkles: :: Add ci --- .github/workflows/ondosee_android_ci.yml | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/ondosee_android_ci.yml diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml new file mode 100644 index 0000000..0ad5345 --- /dev/null +++ b/.github/workflows/ondosee_android_ci.yml @@ -0,0 +1,78 @@ +name: Ondosee Android CI + +on: + push: + branches: [ "master", "develop" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + sdk-version: [ 26, 35 ] + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Gradle caching + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{runner.os}}-gradle-${{hashFiles('**/*.gradle*', '**/gradle-wrapper.properties')}} + restore-keys: | + ${{runner.os}}-gradle- + + - name: Setup JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: 17 + + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + with: + api-level: ${{ matrix.sdk-version }} + components: build-tools;30.0.3 + licenses: android-sdk-license-5be876d5 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Create LOCAL_PROPERTIES + run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties + + - name: Build with Gradle + run: ./gradlew build + + - name: OhNalMwo Android CI Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ success() }} + with: + title: ✅ Ondosee-Android-CI 성공! ✅ + webhook: ${{ secrets.Ondosee_DISCORD_WEBHOOK }} + status: ${{ job.status }} + image: ${{ secrets.SUCCESS_IMAGE }} + description: "온도도씨~" + color: 00FF00 + url: "https://github.com/sarisia/actions-status-discord" + username: OhNalMwo CI 봇 + + - name: OhNalMwo Android CI Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ failure() }} + with: + title: ❗️ Ondosee-Android-CI 실패! ❗️ + webhook: ${{ secrets.Ondosee_DISCORD_WEBHOOK }} + status: ${{ job.status }} + image: ${{ secrets.FAILED_IMAGE }} + description: "오날뭐?" + color: 00FF00 + url: "https://github.com/sarisia/actions-status-discord" + username: OhNalMwo CI 봇 From 2fee285db718cde01d1fff9e1e1c9470a39bc318 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 10:36:33 +0900 Subject: [PATCH 02/10] :sparkles: :: Add cd --- .github/workflows/ondosee_android_cd.yml | 93 ++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/ondosee_android_cd.yml diff --git a/.github/workflows/ondosee_android_cd.yml b/.github/workflows/ondosee_android_cd.yml new file mode 100644 index 0000000..ed1b866 --- /dev/null +++ b/.github/workflows/ondosee_android_cd.yml @@ -0,0 +1,93 @@ +name: Ondosee-Android CD + +on: + push: + branches: [ "master" ] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: master + + - name: Setup JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: 17 + + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Create LOCAL_PROPERTIES + run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties + + - name: Create service_account.json + run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json + + - name: Assemble Release Bundle + run: ./gradlew bundleRelease + + - name: Sign Release + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: app/build/outputs/bundle/release + signingKeyBase64: ${{ secrets.SIGNING_KEY }} + alias: ${{ secrets.ALIAS }} + keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.KEY_PASSWORD }} + + - name: Upload AAB + uses: actions/upload-artifact@v1 + with: + name: app + path: app/build/outputs/bundle/release/app-release.aab + + - name: Deploy to production + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: service_account.json + packageName: com.goms.goms_android_v2 + releaseFiles: app/build/outputs/bundle/release/app-release.aab + track: production + + - name: Goms Android CD Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ success() }} + with: + title: ✅ Goms-Android-CD 성공! ✅ + webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} + status: ${{ job.status }} + image: ${{ secrets.SUCCESS_IMAGE }} + description: 드가자아!!! + color: 00FF00 + url: "https://github.com/sarisia/actions-status-discord" + username: GOMS CD 봇 + + - name: Goms Android CD Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ failure() }} + with: + title: ❗️ Goms-Android-CD 실패! ❗️ + webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} + status: ${{ job.status }} + image: ${{ secrets.FAIL_IMAGE }} + description: 까비요 + color: 00FF00 + url: "https://github.com/sarisia/actions-status-discord" + username: GOMS CD 봇 \ No newline at end of file From 1319e47fba61fae148c409e751628cfdab68a219 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 10:38:43 +0900 Subject: [PATCH 03/10] :sparkles: :: Add github actions --- .github/workflows/ondosee_android_cd.yml | 18 +++++++++--------- .github/workflows/ondosee_android_ci.yml | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ondosee_android_cd.yml b/.github/workflows/ondosee_android_cd.yml index ed1b866..0d08a58 100644 --- a/.github/workflows/ondosee_android_cd.yml +++ b/.github/workflows/ondosee_android_cd.yml @@ -66,28 +66,28 @@ jobs: releaseFiles: app/build/outputs/bundle/release/app-release.aab track: production - - name: Goms Android CD Discord Notification + - name: OnNalMwo Android CD Discord Notification uses: sarisia/actions-status-discord@v1 if: ${{ success() }} with: - title: ✅ Goms-Android-CD 성공! ✅ - webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} + title: ✅ Ondosee-Android-CD 성공! ✅ + webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.SUCCESS_IMAGE }} description: 드가자아!!! color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" - username: GOMS CD 봇 + username: OnNalMwo CD 봇 - - name: Goms Android CD Discord Notification + - name: OnNalMwo Android CD Discord Notification uses: sarisia/actions-status-discord@v1 if: ${{ failure() }} with: - title: ❗️ Goms-Android-CD 실패! ❗️ - webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} + title: ❗️ Ondosee-Android-CD 실패! ❗️ + webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.FAIL_IMAGE }} - description: 까비요 + description: 나가자.. color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" - username: GOMS CD 봇 \ No newline at end of file + username: OnNalMwo CD 봇 \ No newline at end of file diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index 0ad5345..fd66864 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -56,7 +56,7 @@ jobs: if: ${{ success() }} with: title: ✅ Ondosee-Android-CI 성공! ✅ - webhook: ${{ secrets.Ondosee_DISCORD_WEBHOOK }} + webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.SUCCESS_IMAGE }} description: "온도도씨~" @@ -69,7 +69,7 @@ jobs: if: ${{ failure() }} with: title: ❗️ Ondosee-Android-CI 실패! ❗️ - webhook: ${{ secrets.Ondosee_DISCORD_WEBHOOK }} + webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.FAILED_IMAGE }} description: "오날뭐?" From e4aa829c9a5c2a93f82ab775d720f379aa2e5717 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 10:50:43 +0900 Subject: [PATCH 04/10] :sparkles: :: Add google-services.json --- .github/workflows/ondosee_android_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index fd66864..3185e8c 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -48,6 +48,9 @@ jobs: - name: Create LOCAL_PROPERTIES run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties + - name: Create google-services.json + run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + - name: Build with Gradle run: ./gradlew build From 1a785acc1099e3d91e33139fdf2d041f6fe94f29 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 10:53:50 +0900 Subject: [PATCH 05/10] :sparkles: :: Set matrix --- .github/workflows/ondosee_android_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index 3185e8c..4eadb6a 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -13,6 +13,7 @@ jobs: strategy: matrix: sdk-version: [ 26, 35 ] + max-parallel: 2 steps: - uses: actions/checkout@v3 From 26f8984a73b2b2fe0e43e7eb2dee59c4242ff88c Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 11:06:23 +0900 Subject: [PATCH 06/10] :memo: :: Add CiTestClass --- core/model/src/main/java/com/ohnalmwo/model/CiTestClass.kt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 core/model/src/main/java/com/ohnalmwo/model/CiTestClass.kt diff --git a/core/model/src/main/java/com/ohnalmwo/model/CiTestClass.kt b/core/model/src/main/java/com/ohnalmwo/model/CiTestClass.kt new file mode 100644 index 0000000..52e7812 --- /dev/null +++ b/core/model/src/main/java/com/ohnalmwo/model/CiTestClass.kt @@ -0,0 +1,4 @@ +package com.ohnalmwo.model + +class CiTestClass { +} \ No newline at end of file From 284c76efd0ef2e4cb8dc3656257e4855041d145c Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 11:16:18 +0900 Subject: [PATCH 07/10] :memo: :: Add sender --- .github/workflows/ondosee_android_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index 4eadb6a..9705131 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -66,7 +66,7 @@ jobs: description: "온도도씨~" color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" - username: OhNalMwo CI 봇 + sender: "OhNalMwo CI 봇" - name: OhNalMwo Android CI Discord Notification uses: sarisia/actions-status-discord@v1 @@ -79,4 +79,4 @@ jobs: description: "오날뭐?" color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" - username: OhNalMwo CI 봇 + sender: "OhNalMwo CI 봇" From 0e13ec17ac0210e8c54685ee5e3f835bf590bb93 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 11:23:06 +0900 Subject: [PATCH 08/10] :memo: :: Add username --- .github/workflows/ondosee_android_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index 9705131..e7401cc 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -66,6 +66,7 @@ jobs: description: "온도도씨~" color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" + username: OhNalMwo CI 봇 sender: "OhNalMwo CI 봇" - name: OhNalMwo Android CI Discord Notification @@ -79,4 +80,6 @@ jobs: description: "오날뭐?" color: 00FF00 url: "https://github.com/sarisia/actions-status-discord" + username: OhNalMwo CI 봇 sender: "OhNalMwo CI 봇" + From 93ba22ea969079acb60141245e7c2ad398e89aa9 Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 11:25:27 +0900 Subject: [PATCH 09/10] :memo: :: Add sdk version view --- .github/workflows/ondosee_android_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index e7401cc..0473f30 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -59,7 +59,7 @@ jobs: uses: sarisia/actions-status-discord@v1 if: ${{ success() }} with: - title: ✅ Ondosee-Android-CI 성공! ✅ + title: ✅ Ondosee-Android-CI 성공! ✅- SDK 버전: ${{ matrix.sdk-version }} webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.SUCCESS_IMAGE }} @@ -73,7 +73,7 @@ jobs: uses: sarisia/actions-status-discord@v1 if: ${{ failure() }} with: - title: ❗️ Ondosee-Android-CI 실패! ❗️ + title: ❗️ Ondosee-Android-CI 실패! ❗️- SDK 버전: ${{ matrix.sdk-version }} webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.FAILED_IMAGE }} From 983bf8a523080d0f8381a0f65bf655a76fa6b43b Mon Sep 17 00:00:00 2001 From: GSM-Minseok Date: Thu, 22 Aug 2024 11:34:41 +0900 Subject: [PATCH 10/10] :memo: :: Delete sdk version view --- .github/workflows/ondosee_android_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ondosee_android_ci.yml b/.github/workflows/ondosee_android_ci.yml index 0473f30..905ff65 100644 --- a/.github/workflows/ondosee_android_ci.yml +++ b/.github/workflows/ondosee_android_ci.yml @@ -59,7 +59,7 @@ jobs: uses: sarisia/actions-status-discord@v1 if: ${{ success() }} with: - title: ✅ Ondosee-Android-CI 성공! ✅- SDK 버전: ${{ matrix.sdk-version }} + title: ✅ Ondosee-Android-CI 성공! ✅ webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.SUCCESS_IMAGE }} @@ -73,7 +73,7 @@ jobs: uses: sarisia/actions-status-discord@v1 if: ${{ failure() }} with: - title: ❗️ Ondosee-Android-CI 실패! ❗️- SDK 버전: ${{ matrix.sdk-version }} + title: ❗️ Ondosee-Android-CI 실패! webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} status: ${{ job.status }} image: ${{ secrets.FAILED_IMAGE }}