From 07c5696e990f131d65e504f7ac35f03001df87cd Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Sat, 30 Sep 2023 22:17:25 +0300 Subject: [PATCH] ci(android-build): :construction_worker: initial android build ci added Signed-off-by: Onuralp SEZER --- .github/workflows/android-ci.yml | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/android-ci.yml diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml new file mode 100644 index 00000000..ccf76746 --- /dev/null +++ b/.github/workflows/android-ci.yml @@ -0,0 +1,47 @@ +name: android-ci + +on: + push: + branches: + - beta + - main + pull_request: + branches: + - beta + - main + - dev + branch_protection_rule: + types: [created, completed] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + + - uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17.X + + - name: Build the app + run: ./gradlew assembleDebug + + - name: Upload apk + uses: actions/upload-artifact@v3 + with: + name: debug apk + path: app/build/outputs/apk/debug/app-debug.apk