From 1df85e64e4e635d488e520a274c42483fde9f44d Mon Sep 17 00:00:00 2001 From: Mugunthan Date: Wed, 11 Jan 2023 16:30:14 +0530 Subject: [PATCH] This will works fine instead of prev pull req (#156) * Create BuildTest.yml * Update and rename BuildTest.yml to build.yml * Update build.yml --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..5c366dbb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build APK + +on: + + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + workflow_dispatch: + + +jobs: + + 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: Touch local properties + run: touch local.properties + - name: Add Api Key + run: echo "apiKey=\"\"" >> local.properties + + - name: Assemble Debug + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: ComposeCookBook + path: app/build/outputs/apk/debug/**.apk