image: archlinux
repositories:
aurbuild: >
https://aurbuild.xdavidwu.link/#F73F137D4573DEFAA097DBF09544CFF6B08A3FD3
# hackish, key seems mandatory
multilib: >
https://mirror.xtom.com.hk/archlinux/multilib/os/x86_64/#F73F137D4573DEFAA097DBF09544CFF6B08A3FD3
packages:
- jdk11-openjdk
- android-sdk-cmdline-tools-latest
secrets:
- a32cf57c-bbf2-4054-b7d1-8ff2bb2baed1
- a7670f65-3769-4459-8146-bf43a8b0b009
sources:
environment:
tasks:
- patch: |
cd "$source"
sed -i "s/versionCode.*$/versionCode $(date +'%s')/" $(find . -name build.gradle)
- build: |
. /etc/profile
cd "$source"
./gradlew assembleDebug
- deploy: |
cd "$source"
ver=$(git rev-parse HEAD)
test -f build/outputs/apk/debug/*-debug.apk && apk=$(echo build/outputs/apk/debug/*-debug.apk) || true
test -f */build/outputs/apk/debug/*-debug.apk && apk=$(echo */build/outputs/apk/debug/*-debug.apk) || true
test -f "$apk"
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
ssh deploy@fdroid.xdavidwu.link "$source-debug-$ver.apk" < "$apk"
triggers:
- action: email
condition: always
to: xdavidwuph@gmail.com