-
Notifications
You must be signed in to change notification settings - Fork 18
111 lines (105 loc) · 3.14 KB
/
flutter.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
107
108
109
110
111
name: "Build for all platforms"
on: workflow_dispatch
jobs:
build_windows:
runs-on: windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: dart run msix:create --install-certificate false
- name: Upload windows build
uses: actions/upload-artifact@v4
with:
name: otzaria.msix
path: build/windows/x64/runner/release/otzaria.msix
build_linux:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libblkid1 liblzma5
- run: flutter build linux
- name: zip the bundle
run: cd build/linux/x64/release/bundle/ && zip -r otzaria-linux.zip ./
- name: Upload linux build
uses: actions/upload-artifact@v4
with:
name: otzaria-linux.zip
path: build/linux/x64/release/bundle/otzaria-linux.zip
build_android:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter build apk
- name: Upload apk
uses: actions/upload-artifact@v4
with:
name: otzaria-android.apk
path: build/app/outputs/flutter-apk/app-release.apk
build_macos:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter build macos
- name: Zip the app bundle
run: cd build/macos/Build/Products/Release && zip -r otzaria-macos.zip otzaria.app
- name: Upload macos build
uses: actions/upload-artifact@v4
with:
name: otzaria-macos.zip
path: build/macos/Build/Products/Release/otzaria-macos.zip
build_ios:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- name: Build iOS
run: |
flutter build ios --release
cd build/ios/iphoneos
mkdir Payload
cp -r Runner.app Payload
zip -r otzaria-ios.ipa Payload
- name: Upload iOS build
uses: actions/upload-artifact@v4
with:
name: otzaria-ios.ipa
path: build/ios/iphoneos/otzaria-ios.ipa
- name: Upload iOS archive
uses: actions/upload-artifact@v4
with:
name: ios-build
path: |
build/ios/archive/Runner.xcarchive
build/ios/iphoneos/