From aac9b12aea32eb9cebd20a96c9f908a02591968d Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Mon, 27 Dec 2021 21:21:49 +0530 Subject: [PATCH] Add GitHub workflow --- .github/workflows/android_workflow.yml | 43 ++++++++++++++++++++++ .github/workflows/android_workflow.yml.bak | 43 ++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/android_workflow.yml create mode 100644 .github/workflows/android_workflow.yml.bak diff --git a/.github/workflows/android_workflow.yml b/.github/workflows/android_workflow.yml new file mode 100644 index 000000000..03c5d5f0d --- /dev/null +++ b/.github/workflows/android_workflow.yml @@ -0,0 +1,43 @@ +name: Android CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: Build APK + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.5.0 + with: + access_token: ${{ github.token }} + + - name: Clone repo + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build debug apk + uses: eskatos/gradle-command-action@v1 + with: + arguments: assembleDebug + distributions-cache-enabled: true + dependencies-cache-enabled: true + configuration-cache-enabled: true + + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: ${{ !github.head_ref }} + with: + name: apk-debug + path: app/build/outputs/apk/debug \ No newline at end of file diff --git a/.github/workflows/android_workflow.yml.bak b/.github/workflows/android_workflow.yml.bak new file mode 100644 index 000000000..9dd2cd369 --- /dev/null +++ b/.github/workflows/android_workflow.yml.bak @@ -0,0 +1,43 @@ +name: Android CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: Build apk + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.5.0 + with: + access_token: ${{ github.token }} + + - name: Clone repo + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build debug apk + uses: eskatos/gradle-command-action@v1 + with: + arguments: assembleDebug + distributions-cache-enabled: true + dependencies-cache-enabled: true + configuration-cache-enabled: true + + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: ${{ !github.head_ref }} + with: + name: apk-debug + path: app/build/outputs/apk/debug \ No newline at end of file