on:
  push:
    paths:
      - dialer/**

jobs:
  build:
    runs-on: debian
    steps:
      - uses: actions/checkout@v1
        with:
          subpath: dialer/
      - uses: docker://git.gmoker.com/icing/flutter:main
      - uses: actions/upload-artifact@v1
        with:
          name: icing-dialer-${{ gitea.ref_name }}-${{ gitea.run_id }}.apk
          path: build/app/outputs/flutter-apk/app-release.apk

  build-stealth:
    runs-on: debian
    steps:
      - uses: actions/checkout@v1
        with:
          subpath: dialer/
      - uses: docker://git.gmoker.com/icing/flutter:main
        with:
          args: "build apk --dart-define=STEALTH=true"
      - uses: actions/upload-artifact@v1
        with:
          name: icing-dialer-stealth-${{ gitea.ref_name }}-${{ gitea.run_id }}.apk
          path: build/app/outputs/flutter-apk/app-release.apk
