weibo_kit/.github/workflows/build.yml
2022-05-19 16:12:25 +08:00

54 lines
1.5 KiB
Dart

name: build
on: [push, pull_request]
jobs:
build_ios:
name: Build iOS on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: cd example; flutter build ios --no-codesign
build_android:
name: Build Android on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: dart --version
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: flutter pub publish --dry-run
- run: flutter analyze lib example/lib
- run: sudo echo "y" | sudo $ANDROID_HOME/tools/bin/sdkmanager "ndk;21.1.6352462"
- run: cd example; flutter build apk --debug