From 05db9fcfd3bbbb368fc487380d8e9a0bc70abf36 Mon Sep 17 00:00:00 2001 From: Mathias Mogensencd collaction_website Date: Mon, 19 Dec 2022 21:20:43 +0100 Subject: [PATCH] cicd: split up google-services depending on environment --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c00b8478..29f69ee8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: build_android: if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }} - needs: [analyze, test] + needs: [analyze] runs-on: macos-latest timeout-minutes: 60 steps: @@ -158,9 +158,11 @@ jobs: run: flutter pub run flutter_launcher_icons:main - name: Build appbundle + env: + GOOGLE_SERVICES_JSON: ${{ github.ref == 'refs/heads/master' && secrets.ANDROID_GOOGLE_SERVICES_JSON || secrets.ANDROID_GOOGLE_SERVICES_JSON_DEV }} run: | echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env - echo ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON }} | base64 -d > android/app/google-services.json + echo $GOOGLE_SERVICES_JSON | base64 -d > android/app/google-services.json flutter build appbundle --release --build-number $GITHUB_RUN_NUMBER cp release_notes.txt build/app/outputs/