name: Flutter Schmutter

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: checkout code
        uses: actions/checkout@v4
      
      - name: set up jdk
        uses: actions/setup-java@v3
        with:
          java-version: '21'
          distribution: temurin
      
      - name: setup android sdk
        uses: android-actions/setup-android@v3
      
      - name: setup flutter
        uses: subosito/flutter-action@v2
        with:
          flutter-version: 3.33.0-0.2.pre
          channel: master

      - name: install deps
        run: flutter pub get
        env:
          TAR_OPTIONS: --no-same-owner
      
      - name: build apk
        run: flutter build apk --release
