From 9783ab47de16422e325a2ffcedd43ccdc9831677 Mon Sep 17 00:00:00 2001 From: "Cuong M. Tran" Date: Sun, 4 Feb 2024 17:13:02 +0700 Subject: [PATCH] Add github script to build develop branch --- .github/workflows/build_develop.yml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build_develop.yml diff --git a/.github/workflows/build_develop.yml b/.github/workflows/build_develop.yml new file mode 100644 index 000000000..4c1373a78 --- /dev/null +++ b/.github/workflows/build_develop.yml @@ -0,0 +1,43 @@ +name: Development Builder +on: + push: + branches: + - develop + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build develop commit + runs-on: ubuntu-latest + + steps: + - name: Clone repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Android SDK + run: | + ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3" + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: adopt + + - name: Write google-services.json + uses: DamianReeves/write-file-action@v1.2 + with: + path: app/google-services.json + contents: ${{ secrets.GOOGLE_SERVICES_TEXT }} + write-mode: overwrite + + - name: Build app + if: ${{ ! startsWith(github.ref, 'refs/tags/') && github.repository == 'cuong-tran/komikku' }} + uses: gradle/gradle-command-action@v2 + with: + arguments: assembleStandardRelease -x ktlintFormat --stacktrace