📝 修改描述 #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
# This job will run on macos virtual machine | |
runs-on: macos-13 | |
steps: | |
# Setup Java environment in order to build the Android app. | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'gradle' | |
# Setup the flutter environment. | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' # 'dev', 'alpha', default to: 'stable' | |
# flutter-version: '1.22.x' # you can also specify exact version of flutter | |
# Get flutter dependencies. | |
- run: flutter pub get | |
# Check for any formatting issues in the code. | |
- run: dart format --set-exit-if-changed . | |
# Statically analyze the Dart code for any errors. | |
- run: dart analyze . | |
##### | |
# Build app | |
##### | |
# Build apk. | |
- run: cd example && flutter build apk | |
# Build ios | |
- run: cd example && flutter build ios --no-codesign |