diff --git a/.github/workflows/ondosee_android_cd.yml b/.github/workflows/ondosee_android_cd.yml new file mode 100644 index 0000000..0d08a58 --- /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: OnNalMwo Android CD Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ success() }} + with: + 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: OnNalMwo CD 봇 + + - name: OnNalMwo Android CD Discord Notification + uses: sarisia/actions-status-discord@v1 + if: ${{ failure() }} + with: + title: ❗️ Ondosee-Android-CD 실패! ❗️ + webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }} + status: ${{ job.status }} + image: ${{ secrets.FAIL_IMAGE }} + description: 나가자.. + color: 00FF00 + url: "https://github.com/sarisia/actions-status-discord" + 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 new file mode 100644 index 0000000..905ff65 --- /dev/null +++ b/.github/workflows/ondosee_android_ci.yml @@ -0,0 +1,85 @@ +name: Ondosee Android CI + +on: + push: + branches: [ "master", "develop" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + sdk-version: [ 26, 35 ] + max-parallel: 2 + + 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: Create google-services.json + run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + + - 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 봇 + sender: "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 봇 + sender: "OhNalMwo CI 봇" + 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