feat(ci): build app for PRs and pushes to main

This commit is contained in:
kolaente 2021-10-25 20:24:03 +02:00
parent 032bf1c532
commit 1bfec41239
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 44 additions and 0 deletions

42
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Flutter Build
on:
push:
branches:
- main
pull_request:
jobs:
build-app:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: stable
- name: Cache pub dependencies
uses: actions/cache@v2
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
- name: Build Android App Bundle
run: flutter build appbundle
- name: Build Android APK
run: flutter build apk

View File

@ -21,10 +21,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: stable
- name: Flutter version
run: flutter --version