-
Notifications
You must be signed in to change notification settings - Fork 37
69 lines (68 loc) · 2.71 KB
/
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
name: Build Komodo Wallet
on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches:
- master
schedule:
- cron: '0 0 * * 1'
jobs:
build-android:
name: Build Android APK
runs-on: ubuntu-latest
steps:
# Common setup
# TODO: Remove workaround at some future point
- name: Workaround git protocol error
run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Set up Android SDK
uses: android-actions/setup-android@v2
- name: Set up Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: '2.8.1'
architecture: x64
cache: true
- name: Get dependencies
run: flutter pub get --suppress-analytics
# extra Gradle caching
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
# mm2 lib download
- run: mkdir -p android/app/src/main/cpp/libs/{armeabi-v7a,arm64-v8a}
- run: curl -l --header ${{ secrets.MM2_DOWNLOAD_HEADER }} "https://gitlab.com/api/v4/projects/11069706/jobs/artifacts/mm2.1-cross/raw/target/armv7-linux-androideabi/release/libmm2.a?job=android-armv7" --output "android/app/src/main/cpp/libs/armeabi-v7a/libmm2.a"
- run: curl -l --header ${{ secrets.MM2_DOWNLOAD_HEADER }} "https://gitlab.com/api/v4/projects/11069706/jobs/artifacts/mm2.1-cross/raw/target/aarch64-linux-android/release/libmm2.a?job=android-aarch64" --output "android/app/src/main/cpp/libs/arm64-v8a/libmm2.a"
# Save API binaries
- name: Create API binaries directory
run: mkdir -p build/api-binaries/
- name: Copy API binaries
run: |
cp android/app/src/main/cpp/libs/armeabi-v7a/libmm2.a build/api-binaries/libmm2-armeabi-v7a.a
cp android/app/src/main/cpp/libs/arm64-v8a/libmm2.a build/api-binaries/libmm2-arm64-v8a.a
# Upload API binaries
- name: Upload API binaries
uses: actions/upload-artifact@v3
with:
name: api-binaries
path: build/api-binaries/
# APK build
- name: Build release APK
run: flutter build apk --release --obfuscate --split-debug-info=build/debug-info/
- name: Save generated APK
uses: actions/upload-artifact@v3
with:
name: android-apk
path: build/app/outputs/flutter-apk/app-release.apk
- name: Save debug info
uses: actions/upload-artifact@v3
with:
name: android-debug-info
path: build/debug-info/