name: Build

on:
  pull_request:
  push:
    branches:
      - master
      - flutter

jobs:
  build:
    name: Build
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@master
      - name: Retrieve encryption keys
        id: decode_keystore
        uses: timheuer/base64-to-file@v1.0.3
        with:
          fileName: "android/android-signing-keystore.jks"
          encodedString: ${{ secrets.SIGNING_KEYSTORE_BASE64 }}
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: "1.22.5"
      - name: Build Flutter app
        run: flutter build appbundle
        env:
          SIGNING_KEYSTORE_PATH: ${{ steps.decode_keystore.outputs.filePath }}
          SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
          SIGNING_KEY_ALIAS: ${{ secrets.UPLOAD_KEY_ALIAS }}
          SIGNING_KEY_PASSWORD: ${{ secrets.UPLOAD_KEY_PASSWORD }}

name: Build

on:
  pull_request:
  push:
    branches:
      - master
      - flutter

jobs:
  test:
    name: Run Tests
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@master
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: "1.22.5"
      - run: flutter test

  build:
    name: Build Android App Bundle
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@master
      - name: Retrieve encryption keys
        id: decode_keystore
        uses: timheuer/base64-to-file@v1.0.3
        with:
          fileName: "android/android-signing-keystore.jks"
          encodedString: ${{ secrets.SIGNING_KEYSTORE_BASE64 }}
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: "1.22.5"
      - name: Build Flutter app
        run: flutter build appbundle
        env:
          SIGNING_KEYSTORE_PATH: ${{ steps.decode_keystore.outputs.filePath }}
          SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
          SIGNING_KEY_ALIAS: ${{ secrets.UPLOAD_KEY_ALIAS }}
          SIGNING_KEY_PASSWORD: ${{ secrets.UPLOAD_KEY_PASSWORD }}

Add job running unit tests
Add job running unit tests
