mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 01:39:18 +02:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Upload Preview APK
|
|
|
|
on: pull_request
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Upload Preview APK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
working-directory: jni/deltachat-core-rust
|
|
- uses: actions/setup-java@v5
|
|
with:
|
|
java-version: 17
|
|
distribution: 'temurin'
|
|
- uses: android-actions/setup-android@v3
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r27
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/actions/wrapper-validation@v4
|
|
|
|
- name: Compile core
|
|
env:
|
|
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
run: |
|
|
export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/"
|
|
scripts/install-toolchains.sh && scripts/ndk-make.sh
|
|
|
|
- name: Build APK
|
|
run: ./gradlew --no-daemon assembleGplayDebug
|
|
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-preview.apk
|
|
path: 'build/outputs/apk/gplay/debug/*.apk'
|