-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (77 loc) · 2.65 KB
/
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
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
name: Android release
on:
push:
tags:
- "v*.*.*"
jobs:
android_release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android
- name: install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
local-cache: true
# TODO check after https://github.com/nttld/setup-ndk/issues/518 is fixed
- name: Restore Android Symlinks
run: |
directory="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin"
find "$directory" -type l | while read link; do
current_target=$(readlink "$link")
new_target="$directory/$(basename "$current_target")"
ln -sf "$new_target" "$link"
echo "Changed $(basename "$link") from $current_target to $new_target"
done
- name: Install pnpm deps
run: pnpm install
- name: Prettier
run: pnpm prettier
- name: Lint
run: pnpm lint
- name: Build interface
run: pnpm build
- name: fmt
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
- name: Clippy
run: cargo clippy --manifest-path=src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
- name: build Apk
run: pnpm tauri android build --target aarch64 --split-per-abi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STRONGHOLD_SALT: ${{ secrets.STRONGHOLD_SALT }}
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- uses: filippoLeporati93/android-release-signer@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: src-tauri/gen/android/app/build/outputs/apk/arm64/release/
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload file
uses: softprops/action-gh-release@v2.0.8
with:
files: ${{steps.sign_app.outputs.signedReleaseFile}}