From 79ba1c0a0010337b0b75dbed2919276b8dc7b287 Mon Sep 17 00:00:00 2001 From: Soo Hwan Na Date: Fri, 7 Jun 2024 13:02:19 +0900 Subject: [PATCH] TgBot++: workflows: Add android app ci --- .github/workflows/android_client_test.yml | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/android_client_test.yml diff --git a/.github/workflows/android_client_test.yml b/.github/workflows/android_client_test.yml new file mode 100644 index 00000000..10aa85f8 --- /dev/null +++ b/.github/workflows/android_client_test.yml @@ -0,0 +1,55 @@ +name: Build TgBot++ Client (Android) + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + env: + # Customize the Java version needed for your project here + JAVA_VERSION: '17' + + steps: + - name: Checkout code + uses: actions/checkout@v4.1.6 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4.2.1 + with: + distribution: 'zulu' + java-version: ${{ env.JAVA_VERSION }} + + - name: Prepare Gradle Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Set up Android SDK + uses: android-actions/setup-android@v3.2.1 + + - name: Grant execute permission for gradlew + run: chmod +x clientapp/android/gradlew + + - name: Build with Gradle + run: | + cd clientapp/android + ./gradlew --no-daemon build + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + with: + name: app-build + path: | + clientapp/android/app/build/outputs/apk/