From ffd094adb39cfa37ca8687634b11e709a64d0507 Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Tue, 3 Dec 2024 17:11:13 +0100 Subject: [PATCH] Initial test for automated builds --- .github/workflows/build.yml | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 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 0000000..e773f9f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: Production Builds +on: + workflow_dispatch: + inputs: + name: + description: "Release-Build" + default: "Generate release build" + testers: + type: choice + description: "Select testers" + options: + - android + - internalTesters + - everyone + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checking out branch + uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Android SDK + uses: android-actions/setup-android@v2.0.10 + + - name: Build Release apk + run: ./gradlew assembleRelease --stacktrace + + - name: Build Release bundle + run: ./gradlew bundleRelease --stacktrace + + - name: Get release file aab path + id: releaseAab + run: echo "aabfile=$(find app/build/outputs/bundle/release/*.aab)" >> $GITHUB_OUTPUT + + - name: Get release file apk path + id: releaseApk + run: echo "apkfile=$(find app/build/outputs/apk/release/*.apk)" >> $GITHUB_OUTPUT + + - name: Zip Files + uses: papeloto/action-zip@v1 + with: + files: ${{ steps.releaseAab.outputs.aabfile }} ${{ steps.releaseApk.outputs.apkfile }} + dest: ${{ steps.releaseApk.outputs.apkfile }}.zip + + - name: Upload Release Build to Artifacts + uses: actions/upload-artifact@v3 + with: + name: release-artifacts + path: ${{ steps.releaseApk.outputs.apkfile }} \ No newline at end of file