From 03aa6fec9a40915c2818be68b54fda9f2fe2a6b0 Mon Sep 17 00:00:00 2001 From: Abdullah naseem <143761991+kjjjjjjjjjjjj@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:46:18 +0500 Subject: [PATCH] Create main.yml --- main.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 main.yml diff --git a/main.yml b/main.yml new file mode 100644 index 0000000..7007258 --- /dev/null +++ b/main.yml @@ -0,0 +1,47 @@ +name: Debug Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-${{ runner.os }} + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Debug config + run: ./gradlew assembleDebug + + - name: Run tests + run: ./gradlew test + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + with: + name: debug-apk + path: app/build/outputs/apk/debug/*.apk