Skip to content

Commit

Permalink
cicd: split up google-services depending on environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Xazin committed Dec 19, 2022
1 parent 9adc029 commit 05db9fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit 05db9fc

Please sign in to comment.