Skip to content

Sanmill v3.5.4 (3507) #1370

Sanmill v3.5.4 (3507)

Sanmill v3.5.4 (3507) #1370

Workflow file for this run

name: Flutter
on:
push:
branches: [master, dev]
pull_request:
types: [review_requested, ready_for_review]
paths:
- 'src/ui/flutter_app/**'
jobs:
linter:
runs-on: ubuntu-latest
name: Lint flutter code
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.12'
- run: bash -x ./flutter-init.sh
- run: cp -f ./src/ui/flutter_app/analysis_options.yaml ./
- name: Analyze Flutter
uses: ValentinVignal/action-dart-analyze@v0.14
with:
fail-on: 'format'
working-directory: src/ui/flutter_app
build:
runs-on: ubuntu-latest
needs: linter
# 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@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11.0.16+101'
- run: echo $SIGNING_KEY | base64 -d > src/ui/flutter_app/android/app/key.jks
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.12'
- name: Export environment valuables
run: export
- name: Create App version
run: git fetch --tags; git tag; git log -n1; bash -x ./version.sh
- name: Print Flutter SDK version
run: flutter --version
- name: Install dependencies
run: bash -x ./flutter-init.sh
# 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_app; rm android/app/build.gradle; mv android/app/build.gradle_github android/app/build.gradle; flutter build apk -v; flutter build appbundle -v
env:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PATH: key.jks
# Archive apk
- name: Archive apk
uses: actions/upload-artifact@v3
with:
name: sanmill-flutter-apk-release
path: src/ui/flutter_app/build/app/outputs/flutter-apk/app-release.apk
# Archive aab
- name: Archive aab
uses: actions/upload-artifact@v3
with:
name: sanmill-flutter-aab-release
path: src/ui/flutter_app/build/app/outputs/bundle/release/app-release.aab