Some checks failed
Android Build (Xiaomi) / build-android (push) Failing after 2m1s
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Android Build (Xiaomi)
|
|
on: [push]
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
# Wir wechseln auf ein Standard-Image, das stabil erreichbar ist
|
|
container:
|
|
image: node:20-bookworm
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install System Dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
wget \
|
|
file \
|
|
libssl-dev \
|
|
pkg-config \
|
|
openjdk-17-jdk \
|
|
git
|
|
|
|
- name: Install Rust
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
rustup target add aarch64-linux-android
|
|
|
|
- name: Setup Android SDK
|
|
run: |
|
|
mkdir -p /opt/android-sdk/cmdline-tools
|
|
cd /opt/android-sdk/cmdline-tools
|
|
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
|
|
unzip *.zip
|
|
mv cmdline-tools latest
|
|
cd ..
|
|
yes | ./cmdline-tools/latest/bin/sdkmanager --sdk_root=/opt/android-sdk "platform-tools" "platforms;android-33" "build-tools;33.0.1" "ndk;25.1.8937393"
|
|
echo "ANDROID_HOME=/opt/android-sdk" >> $GITHUB_ENV
|
|
echo "NDK_HOME=/opt/android-sdk/ndk/25.1.8937393" >> $GITHUB_ENV
|
|
|
|
- name: Install Node Dependencies
|
|
run: npm install
|
|
|
|
- name: Build Android APK
|
|
run: |
|
|
if [ ! -d "src-tauri/gen/android" ]; then
|
|
npx tauri android init
|
|
fi
|
|
# Wichtig: PATH für Rust setzen, falls nicht erkannt
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
npx tauri android build --target aarch64
|
|
env:
|
|
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
|
|
|
|
- name: Upload APK Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Xiaomi-Release-APK
|
|
path: src-tauri/gen/android/app/build/outputs/apk/release/*.apk
|