From 425b7d42fd38ded41a3bd2dcf2b07bd5d86516cd Mon Sep 17 00:00:00 2001 From: Iliyan Germanov Date: Sun, 16 Apr 2023 01:58:57 +0300 Subject: [PATCH] Add workflow to build debug APK --- .github/workflows/build_prod_debug.yml | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build_prod_debug.yml diff --git a/.github/workflows/build_prod_debug.yml b/.github/workflows/build_prod_debug.yml new file mode 100644 index 0000000000..fd8ade5673 --- /dev/null +++ b/.github/workflows/build_prod_debug.yml @@ -0,0 +1,50 @@ +name: Build Prod Debug APK + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build: + runs-on: ubuntu-latest + + # Fix GitHub Actions crashing with: + # CRASH: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) + env: + GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g" + + steps: + - name: Checkout GIT + uses: actions/checkout@v2 + + - name: Setup Java SDK + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + #---------------------------------------------------- + + #Optimization + - name: Enable Gradle Wrapper caching (optimization) + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + #--------------------------------------------------- + + # RUN + - name: Build debug APK + run: ./gradlew assembleDebug + + - name: Set commit SHA as an output so it can be included in the APK filename + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: "Ivy-Wallet-Prod-Debug-${{ steps.vars.outputs.sha_short }}.apk" + path: app/build/outputs/apk/debug/*.apk + #------------------------------------------------------------------ \ No newline at end of file