-
Notifications
You must be signed in to change notification settings - Fork 27
47 lines (38 loc) · 1.25 KB
/
build_android_release.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
name: Android
on:
create:
workflow_dispatch:
# push:
# branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
env:
APP_NAME: ethertia
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Dependencies
run: |
rustup target add aarch64-linux-android
cargo install --force cargo-apk
# sudo apt-get install pkg-config libssl-dev
- name: Build for Android
run: |
mkdir ~/.android
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME \
RANLIB=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib \
cargo apk build --profile android-debug --package mobile
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: android-artifacts
path: |
./target/android-debug/apk/ethertia.apk