name: Build

on:
  pull_request:
  push:

jobs:
  build-android:
    name: Build for Android
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v2
      with:
        distribution: 'zulu'
        java-version: '17'
    - uses: subosito/flutter-action@v2
      with:
        channel: 'stable'
    - run: flutter pub get
    - run: flutter build apk --debug
  build-ios:
    name: Build for iOS
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - uses: subosito/flutter-action@v2
      with:
        channel: 'stable'
        architecture: x64
    - run: flutter pub get
    - run: flutter build ios --release --no-codesign
