From 7a4fb386baa82d83f4da9f6b33a0a25fc171a81d Mon Sep 17 00:00:00 2001 From: mikeplotean Date: Sun, 19 Jan 2025 16:40:46 +0200 Subject: [PATCH] ci: add build android reusable workflow --- .github/workflows/build-android.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build-android.yml diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml new file mode 100644 index 000000000..41bdae260 --- /dev/null +++ b/.github/workflows/build-android.yml @@ -0,0 +1,27 @@ +name: Android CI + +on: + workflow_call: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Configure gradle + uses: ./.github/actions/gradle-setup-action + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + - name: Configure sdk.dir + run: echo "sdk.dir=${HOME}/.android/sdk" > local.properties + - name: Enable android build + run: | + if grep -q "enableAndroidBuild" gradle.properties; then + sed -i 's/enableAndroidBuild=.*/enableAndroidBuild=true/' gradle.properties + else + echo "enableAndroidBuild=true" >> gradle.properties + fi + - name: Build + run: ./gradlew --no-daemon build \ No newline at end of file