From 70725f7418484bd66bdbf386e2f9379a03ed61ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Mon, 30 Nov 2020 18:15:19 +0100 Subject: [PATCH] Add Android Job on Sourcehut (#390) --- .builds/android.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .builds/android.yml diff --git a/.builds/android.yml b/.builds/android.yml new file mode 100644 index 0000000..9398064 --- /dev/null +++ b/.builds/android.yml @@ -0,0 +1,28 @@ +image: alpine/latest + +packages: +- docker + +sources: +- https://github.com/thestr4ng3r/chiaki.git + +artifacts: +- Chiaki.apk +- Chiaki.aab + +secrets: +- 163950ff-2ac4-423d-a280-d2d9edbef000 +- f4bce41f-f96b-4633-80d8-0ff5dd74dc2a + +tasks: +- build: | + cp -v ~/chiaki-local.properties chiaki/android/local.properties || echo "Secrets not available" + sudo service docker start + timeout 15 sh -c "until sudo docker info; do sleep 0.5; done" + sudo docker run \ + -v /home/build:/home/build \ + -u $(id -u):$(id -g) \ + thestr4ng3r/android:f064ea6 \ + /bin/bash -c "cd /home/build/chiaki/android && ./gradlew assembleRelease bundleRelease" + cp chiaki/android/app/build/outputs/apk/release/app-release*.apk Chiaki.apk + cp chiaki/android/app/build/outputs/bundle/release/app-release*.aab Chiaki.aab