-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (87 loc) · 2.86 KB
/
ci_build.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Flutter Build
on:
workflow_dispatch:
env:
FLUTTER_VERSION: '3.19.3'
jobs:
setup:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
platform: 'android'
target-platform: 'android-arm64'
- os: ubuntu-latest
platform: 'linux'
- os: windows-latest
platform: 'windows'
- os: macos-14
platform: 'ios'
- os: macos-14
platform: 'macos'
steps:
- uses: actions/checkout@v4
- name: Install Flutter SDK
uses: hughware/[email protected]
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
cache-key: flutter-sdk-${{ runner.os }}-${{ env.FLUTTER_VERSION }}
- run: flutter pub get
- name: Set up Java for Android build
if: matrix.platform == 'android'
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
- name: Build for Android
if: matrix.platform == 'android'
#run: flutter build apk --release --target-platform ${{ matrix.target-platform }}
run: flutter build apk --split-per-abi
- name: Build for Linux
if: matrix.platform == 'linux'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev mpv
flutter build linux --release
- name: Build for Windows
if: matrix.platform == 'windows'
run: flutter build windows --release
- name: Build for iOS
if: matrix.platform == 'ios'
run: flutter build ios --release --no-codesign
- name: Build for macOS
if: matrix.platform == 'macos'
run: flutter build macos --release
- name: Upload Artifact for Android
if: matrix.platform == 'android'
uses: actions/upload-artifact@v4
with:
name: android-apps
path: build/app/outputs/flutter-apk/
- name: Upload Artifact for Linux
if: matrix.platform == 'linux'
uses: actions/upload-artifact@v4
with:
name: linux-app
path: build/linux/*/release/bundle
- name: Upload Artifact for Windows
if: matrix.platform == 'windows'
uses: actions/upload-artifact@v4
with:
name: windows-app
path: build/windows/x64/runner/Release/*
- name: Upload Artifact for iOS
if: matrix.platform == 'ios'
uses: actions/upload-artifact@v4
with:
name: ios-app
path: build/ios/iphoneos/*.app
- name: Upload Artifact for macOS
if: matrix.platform == 'macos'
uses: actions/upload-artifact@v4
with:
name: macos-app
path: build/macos/Build/Products/Release/*.app