From 28e3bbc6144b49a060ce8ca789007d7787cd3e0d Mon Sep 17 00:00:00 2001 From: ezhoon Date: Mon, 29 Jul 2024 20:56:10 +0900 Subject: [PATCH] feat: debug cd yml --- .github/firebase-app-distribution/action.yml | 28 +++++++++++++ .../deploy_to_firebase_app_distribution.yml | 41 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/firebase-app-distribution/action.yml create mode 100644 .github/workflows/deploy_to_firebase_app_distribution.yml diff --git a/.github/firebase-app-distribution/action.yml b/.github/firebase-app-distribution/action.yml new file mode 100644 index 00000000..a51e6710 --- /dev/null +++ b/.github/firebase-app-distribution/action.yml @@ -0,0 +1,28 @@ +name: 'Firebase App Distribution' +description: 'Uploads artifacts to Firebase App Distribution' +inputs: + appId: + description: 'Check App ID' + required: true + serviceCredentialsFile: + description: 'Service credentials file' + required: true + file: + description: 'Artifact to upload (.apk or .ipa)' + required: true + groups: + description: 'Distribution groups' + required: true + debug: + description: 'Flag that can included to print verbose log output.' + required: true +runs: + using: "composite" + steps: + - name: upload artifact to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1.5.1 + with: + appId: ${{ input.appId }} + serviceCredentialsFileContent: ${{ input.serviceCredentialsFile }} + groups: ${{ input.groups }} + file: ${{ input.file }} \ No newline at end of file diff --git a/.github/workflows/deploy_to_firebase_app_distribution.yml b/.github/workflows/deploy_to_firebase_app_distribution.yml new file mode 100644 index 00000000..a8afb373 --- /dev/null +++ b/.github/workflows/deploy_to_firebase_app_distribution.yml @@ -0,0 +1,41 @@ +name: "[CD] Deploy Firebase App Distribution" + +on: + push: + branches: + - feature/cat-101 + workflow_dispatch: +env: +jobs: + firebase-app-distribution: + environment: Debug + name: Firebase App Distribution + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Development Environment + uses: ./.github/actions/setup-development-environment + with: + google-services: ${{ secrets.GOOGLE_SERVICES }} + + - name: Build App + run: ./gradlew ":app:assembleDebug" + + - name: Set APK path + id: apk + run: | + echo "NAME=$(find ./ -type f -name "*.apk" -print -quit)" >> $GITHUB_OUTPUT + - name: Create Firebase Credentials + run: | + echo -n "${{ secrets.FIREBASE_CREDENTIALS }}" | base64 --decode > firebase_credentials.json + - name: Upload App Artifact To Firebase App Distribution + uses: ./.github/actions/firebase-app-distribution + timeout-minutes: 10 + with: + appId: ${{ secrets.FIREBASE_APP_ID }} + serviceCredentialsFile: ./firebase_credentials.json + groups: 뽀모냥 + file: ${{ steps.apk.outputs.NAME }} + debug: true \ No newline at end of file