From c6985c050c6c06ce54b7804c24d36a110536736e Mon Sep 17 00:00:00 2001 From: Asem Abu Alrub Date: Mon, 29 Jul 2024 16:04:08 +0300 Subject: [PATCH] Add build APK action --- .github/workflows/build_and_test.yml | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4e7a565..256270c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -40,4 +40,31 @@ jobs: run: chmod +x ./gradlew - name: Run Debug Tests - run: ./gradlew testDebugUnitTest \ No newline at end of file + run: ./gradlew testDebugUnitTest + + build_job: + name: Building the APK + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Assemble Debug + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: apk + path: app/build/outputs/apk/debug/**.apk \ No newline at end of file