From 6474de09e65da1266b5f6126f9f9b25d2b84aab9 Mon Sep 17 00:00:00 2001 From: MunJangHun <105299421+moondev03@users.noreply.github.com> Date: Mon, 5 Aug 2024 01:37:02 +0900 Subject: [PATCH 1/4] [feat] Add Signed Debug Application CI/CD --- .github/workflows/app-distribution-ci-cd.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/app-distribution-ci-cd.yaml diff --git a/.github/workflows/app-distribution-ci-cd.yaml b/.github/workflows/app-distribution-ci-cd.yaml new file mode 100644 index 0000000..bb84c12 --- /dev/null +++ b/.github/workflows/app-distribution-ci-cd.yaml @@ -0,0 +1,49 @@ +name: Build & upload to Firebase App Distribution + +on: + push: + branches: [ develop ] + workflow_dispatch: # 수동 실행 옵션 + +jobs: + build: + runs-on: ubuntu-latest + + env: + LOCAL_PROPERTIES_CONTENTS: ${{ secrets.LOCAL_PROPERTIES_CONTENTS }} + GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '17' + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + + - name: Decode and save keystore + run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > presentation/keystore.jks + + - name: Create google-services.json + run: echo "$GOOGLE_SERVICES_JSON" > presentation/google-services.json + + - name: Create local.properties + run: | + echo "$LOCAL_PROPERTIES_CONTENTS" > local.properties + echo "SIGNED_STORE_FILE=keystore.jks" >> local.properties + + - name: Build debug APK + run: ./gradlew assembleDebug + + - name: Upload to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1 + with: + appId: ${{ secrets.FIREBASE_APP_ID }} + token: ${{ secrets.FIREBASE_TOKEN }} + groups: nabi-team + file: presentation/build/outputs/apk/debug/app-debug.apk From bec759d192ad4e80c399a586666b5998eb03a856 Mon Sep 17 00:00:00 2001 From: MunJangHun <105299421+moondev03@users.noreply.github.com> Date: Mon, 5 Aug 2024 01:39:54 +0900 Subject: [PATCH 2/4] [fix] Update app-distribution-ci-cd.yaml --- .github/workflows/app-distribution-ci-cd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-distribution-ci-cd.yaml b/.github/workflows/app-distribution-ci-cd.yaml index bb84c12..a76f998 100644 --- a/.github/workflows/app-distribution-ci-cd.yaml +++ b/.github/workflows/app-distribution-ci-cd.yaml @@ -44,6 +44,6 @@ jobs: uses: wzieba/Firebase-Distribution-Github-Action@v1 with: appId: ${{ secrets.FIREBASE_APP_ID }} - token: ${{ secrets.FIREBASE_TOKEN }} + serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} groups: nabi-team file: presentation/build/outputs/apk/debug/app-debug.apk From efa3548e7011891db44bcae1240a13d569358053 Mon Sep 17 00:00:00 2001 From: MunJangHun <105299421+moondev03@users.noreply.github.com> Date: Mon, 5 Aug 2024 01:58:13 +0900 Subject: [PATCH 3/4] [fix] Update app-distribution-ci-cd.yaml --- .github/workflows/app-distribution-ci-cd.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/app-distribution-ci-cd.yaml b/.github/workflows/app-distribution-ci-cd.yaml index a76f998..ee189d4 100644 --- a/.github/workflows/app-distribution-ci-cd.yaml +++ b/.github/workflows/app-distribution-ci-cd.yaml @@ -3,6 +3,9 @@ name: Build & upload to Firebase App Distribution on: push: branches: [ develop ] + pull_request: + branches: + - develop workflow_dispatch: # 수동 실행 옵션 jobs: From f1c0dc78457af114a3bfb749ad2f92d3f2be86c1 Mon Sep 17 00:00:00 2001 From: MunJangHun <105299421+moondev03@users.noreply.github.com> Date: Mon, 5 Aug 2024 02:16:45 +0900 Subject: [PATCH 4/4] [fix] Update app-distribution-ci-cd.yaml --- .github/workflows/app-distribution-ci-cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/app-distribution-ci-cd.yaml b/.github/workflows/app-distribution-ci-cd.yaml index ee189d4..7d70bb5 100644 --- a/.github/workflows/app-distribution-ci-cd.yaml +++ b/.github/workflows/app-distribution-ci-cd.yaml @@ -18,12 +18,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'adopt' + distribution: 'temurin' java-version: '17' - name: Grant execute permission for gradlew