-
Notifications
You must be signed in to change notification settings - Fork 7
122 lines (120 loc) · 3.84 KB
/
build.yml
File metadata and controls
122 lines (120 loc) · 3.84 KB
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
112
113
114
115
116
117
118
119
120
121
122
name: build all
on:
push:
branches:
- main
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
# - name: Download Android keystore
# id: android_keystore
# uses: timheuer/base64-to-file@v1.0.3
# with:
# fileName: key.jks
# encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
# - name: Create key.properties
# run: |
# echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
# echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
# echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
# echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: Install dependencies
run: flutter pub get
- name: Build APK
run: flutter build appbundle --release
- name: Archive APK
uses: actions/upload-artifact@v1
with:
name: android-build
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Build IOS
run: flutter build ios --release --no-codesign
- name: Archive IOS
uses: actions/upload-artifact@v1
with:
name: ios-build
path: build/ios/iphoneos/Runner.app
# - name: Export IPA
# run: |
# cd ios
# xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos -configuration Release archive -archivePath $PWD/build/Runner.xcarchive
# xcodebuild -exportArchive -archivePath $PWD/build/Runner.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath $PWD/build/Runner.ipa
# - name: Archive IOS
# uses: actions/upload-artifact@v1
# with:
# name: ios-build
# path: build/ios/build/Runner.ipa/Runner.ipa
build_macos:
runs-on: macos-latest
env:
MACOS_APP_RELEASE_PATH: build/macos/Build/Products/Release
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Build MacOS
run: |
flutter config --enable-macos-desktop
flutter build macos --release
- name: Archive MacOS
uses: actions/upload-artifact@v1
with:
name: macos-build
path: ${{ env.MACOS_APP_RELEASE_PATH }}
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Build Windows
run: flutter build windows --release
- name: Archive Windows
uses: actions/upload-artifact@v1
with:
name: windows-build
path: build/windows/runner/Release
build_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Build Web
run: |
flutter build web --release
mkdir ./web-release
cp -r server build ./web-release
- name: Archive Web
uses: actions/upload-artifact@v1
with:
name: web-build
path: ./web-release