Skip to content

Android CI

Android CI #18

Workflow file for this run

name: Android CI
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: zelodev/Shizuku
ref: master
fetch-depth: 0
submodules: 'recursive'
- name: Write temporary key
run: |
keytool -genkey -alias a -dname CN=_ -storepass passwd -keypass passwd -keystore key.jks
echo KEYSTORE_PASSWORD=passwd >> signing.properties
echo KEYSTORE_ALIAS=a >> signing.properties
echo KEYSTORE_ALIAS_PASSWORD=passwd >> signing.properties
echo KEYSTORE_FILE=../key.jks >> signing.properties
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Cache Gradle Dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-app-${{ hashFiles('**/build.gradle') }}
restore-keys: |
gradle-deps
- name: Cache Gradle Build
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/build-cache-*
key: gradle-builds-app-${{ github.sha }}
restore-keys: |
gradle-builds
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build with Gradle
id: buildWithGradle
run: |
echo 'org.gradle.caching=true' >> gradle.properties
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'org.gradle.vfs.watch=true' >> gradle.properties
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
./gradlew :manager:assembleRelease :manager:assembleDebug
- name: Upload release
uses: actions/upload-artifact@v4
with:
merge-multiple: true
path: '**/*.apk'