mirror of
https://github.com/TeamAmaze/AmazeFileManager.git
synced 2026-10-20 07:21:41 +08:00
7b7086934b
- Pin Rust version to 1.98.1 at Github Actions - Add rust-toolchain.toml to pin Rust version on local builds - Github Action use JDK 21 - Bump NDK version to r30 LTS - Bump Github Action versions and align arguments with reference from release/4.0 branch
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Android Release CI
|
|
|
|
on:
|
|
release:
|
|
types: [published, created]
|
|
|
|
jobs:
|
|
apk:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 21
|
|
- name: Set up NDK
|
|
uses: nttld/setup-ndk@ed92fe6cadad69be94a966a7ee3271275e62f779
|
|
with:
|
|
ndk-version: r30
|
|
link-to-sdk: true
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@1.98.1
|
|
- name: Cache Rust dependencies
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
file_operations/target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
- name: Setup Rust for Android
|
|
run: |
|
|
cd file_operations
|
|
chmod +x setup_rust_android.sh
|
|
./setup_rust_android.sh
|
|
- name: Verify Rust setup
|
|
run: |
|
|
cd file_operations
|
|
echo "🔍 Verifying Rust Android targets..."
|
|
rustup target list --installed | grep android || echo "No Android targets found"
|
|
echo "🔍 Verifying cargo configuration..."
|
|
if [ -f .cargo/config.toml ]; then
|
|
echo "✅ .cargo/config.toml exists"
|
|
else
|
|
echo "❌ .cargo/config.toml missing"
|
|
exit 1
|
|
fi
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v6
|
|
- name: Build with Gradle
|
|
run: ./gradlew assembleDebug --stacktrace
|
|
- name: Upload fdroid artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Amaze-Fdroid-debug
|
|
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
|
|
- name: Upload play artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Amaze-Play-debug
|
|
path: app/build/outputs/apk/play/debug/app-play-debug.apk
|