1+ name : fornet Android client build
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ version :
6+ required : true
7+ description : " version to release"
8+ jobs :
9+ build_android :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ with :
14+ submodules : true
15+ - name : Install Rust
16+ uses : actions-rs/toolchain@v1
17+ with :
18+ toolchain : stable
19+ target : armv7-linux-androideabi, aarch64-linux-android
20+ profile : minimal
21+ - name : Set up JDK
22+ uses : actions/setup-java@v2
23+ with :
24+ java-version : ' 17'
25+ distribution : ' temurin'
26+ cache : gradle
27+ - name : Set up Android NDK
28+ uses : nttld/setup-ndk@v1
29+ with :
30+ ndk-version : ' r25b'
31+ local-cache : true
32+ - uses : subosito/flutter-action@v2
33+ with :
34+ flutter-version : ' 3.10.6'
35+ cache : true
36+ - name : Set up cargo cache
37+ uses : actions/cache@v3
38+ continue-on-error : false
39+ with :
40+ path : |
41+ ~/.cargo/bin/
42+ ~/.cargo/registry/index/
43+ ~/.cargo/registry/cache/
44+ ~/.cargo/git/db/
45+ client/target/
46+ key : ubuntu-android-cargo-${{ hashFiles('**/Cargo.lock') }}
47+ restore-keys : ubuntu-cargo-android
48+ - name : Download Android keystore
49+ id : android_keystore
50+ uses : timheuer/base64-to-file@v1.0.3
51+ with :
52+ fileName : upload-keystore.jks
53+ encodedString : ${{ secrets.KEYSTORE_BASE64 }}
54+ - name : Create key.properties
55+ run : |
56+ echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > app/android/sign.properties
57+ echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> app/android/sign.properties
58+ echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> app/android/sign.properties
59+ echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> app/android/sign.properties
60+ - name : Build
61+ run : make release-android
62+ - name : Upload artifact
63+ uses : actions/upload-artifact@v2
64+ with :
65+ name : android-apk.zip
66+ path : app/android/app/build/outputs/apk/*.apk
67+ if-no-files-found : error
0 commit comments