54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
|
name: Flutter
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ master ]
|
||
|
pull_request:
|
||
|
branches: [ master ]
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
# Note that this workflow uses the latest stable version of the Dart SDK.
|
||
|
# Docker images for other release channels - like dev and beta - are also
|
||
|
# available. See https://hub.docker.com/r/google/dart/ for the available
|
||
|
# images.
|
||
|
#container:
|
||
|
# image: google/dart:latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/setup-java@v1
|
||
|
with:
|
||
|
java-version: '12.x'
|
||
|
- uses: subosito/flutter-action@v1
|
||
|
with:
|
||
|
channel: 'stable' # or: 'dev' or 'beta'
|
||
|
|
||
|
- name: Print Flutter SDK version
|
||
|
run: flutter --version
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: cd src/ui/flutter; flutter pub get
|
||
|
|
||
|
# Uncomment this step to verify the use of 'dart format' on each commit.
|
||
|
# - name: Verify formatting
|
||
|
# run: dart format --output=none --set-exit-if-changed .
|
||
|
|
||
|
# Your project will need to have tests in test/ and a dependency on
|
||
|
# package:test for this step to succeed. Note that Flutter projects will
|
||
|
# want to change this to 'flutter test'.
|
||
|
#- name: Run tests
|
||
|
# run: dart test
|
||
|
|
||
|
# Build
|
||
|
- name: Build apk
|
||
|
run: cd src/ui/flutter; flutter build apk
|
||
|
|
||
|
# Archive
|
||
|
- name: Archive production artifacts
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: sanmill-flutter-apk-release
|
||
|
path: src/ui/flutter/build/app/outputs/flutter-apk/app-release.apk
|