-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (75 loc) · 2.35 KB
/
build_ipa_apk.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
name: Build iOS IPA and Android APK workflow
on: push
jobs:
apk:
name: Build Android APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'oracle'
cache: gradle
- name: Flutter action
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build APK
run: |
echo ${{ secrets.MSB_ANDROID_KEY_PROPERTIES }} | base64 --decode > android/key.properties
echo ${{ secrets.MSB_ANDROID_KEYSTORE_JKS }} | base64 --decode > android/app/msb_app.jks
flutter build apk \
--dart-define=MSB_BOT_NAME=moe_sticker_bot \
--target-platform android-arm,android-arm64
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/msb_app.apk
- name: Upload a APK Artifact
uses: actions/[email protected]
with:
name: apk
path: build/app/outputs/flutter-apk/msb_app.apk
ipa:
name: Build iOS IPA
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Flutter action
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build IPA
run: |
flutter build ios --no-codesign \
--dart-define=MSB_BOT_NAME=moe_sticker_bot
sh scripts/strip_payload.sh build/ios/iphoneos/Runner.app
cd build/ios/iphoneos/
mkdir Payload
mv Runner.app Payload/Runner.app
bsdtar -acvf msb_app.ipa.zip Payload
mv msb_app.ipa.zip msb_app.ipa
- name: Upload a IPA Artifact
uses: actions/[email protected]
with:
name: ipa
path: build/ios/iphoneos/msb_app.ipa
release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: [ apk, ipa ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: release/
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
release/*/*