-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.29 KB
/
preview.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Preview
on:
push:
branches: ["main"]
jobs:
build:
name: build
strategy:
matrix:
target: ["ios --no-codesign", appbundle, macos, linux, windows]
fail-fast: false
runs-on: ${{ matrix.target == 'windows' && 'windows-latest' || matrix.target == 'linux' && 'ubuntu-latest' || 'macos-latest' }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: master
architecture: x64
cache: true
- run: flutter config --enable-macos-desktop --enable-windows-desktop --enable-linux-desktop
- if: matrix.target == 'appbundle'
name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11.x"
distribution: temurin
- if: matrix.target == 'linux'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter pub get
- if: matrix.target == 'ios --no-codesign'
run: flutter precache --ios && pod install
working-directory: example/ios
- if: matrix.target == 'macos'
run: flutter precache --macos && pod install
working-directory: example/macos
- run: flutter build ${{ matrix.target }}
working-directory: example