~xdavidwu/android-autobuilds

ref: 54c01c315ddf03e42196584562d5e4306e20a2f5 android-autobuilds/build.yml -rw-r--r-- 1.1 KiB
54c01c31xdavidwu build: switch mirror 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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