-
Notifications
You must be signed in to change notification settings - Fork 43
81 lines (79 loc) · 2.12 KB
/
pr.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
name: Ci Pull Request
on:
pull_request:
workflow_dispatch:
merge_group:
jobs:
ios-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: subosito/flutter-action@v2
with:
# flutter-version: '2.5.2'
channel: 'stable'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Preprocess
run: |
cd lib/server
echo 'String getValid(String vToken) { return vToken; }' >> salt.dart
cp salt.dart wsalt.dart
cd ../..
python3 preprocess-ios.py
- name: Podfile
run: |
cd ios
rm Podfile.lock
flutter clean
flutter pub get
pod install
pod update
cd ..
- name: Build
run: |
flutter build ios --release --no-codesign
mkdir -p Payload
mv ./build/ios/iphoneos/Runner.app Payload
zip -r -y Payload.zip Payload/Runner.app
mv Payload.zip Payload.ipa
- name: Upload IPA
uses: actions/upload-artifact@v2
with:
name: ipa-build
path: Payload.ipa
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
# flutter-version: '2.5.2'
channel: 'stable'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Preprocess
run: |
cd lib/server
echo 'String getValid(String vToken) { return vToken; }' >> salt.dart
cp salt.dart wsalt.dart
cd ../..
python3 preprocess-android.py
- name: Build
run: |
flutter clean
flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: apk-build
path: ./build/app/outputs/apk/release/app-release.apk