From c1bcea1d29248ff5f3556ebe87291253c47f0a47 Mon Sep 17 00:00:00 2001 From: Izzy Kauffman <121840901+izzy2fancy@users.noreply.github.com> Date: Sun, 28 Apr 2024 06:56:59 -0400 Subject: [PATCH] Add files via upload --- .github/workflows/pr_build.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 63dfa1145..a8715c534 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -1,15 +1,13 @@ -# A workflow to build and upload APKs for pull requests -name: PR Build +# A workflow to build and upload APKs +name: APK Build on: - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ master ] + workflow_dispatch: + # This event allows manual triggering of the workflow + # You can manually trigger this workflow through the GitHub Actions UI or API +env: + UPLOAD_PR_ARTIFACTS: 'true' # Define the variable here -# Only allow the latest build to run for a given PR, and cancel any previous builds -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true jobs: build: @@ -55,20 +53,20 @@ jobs: run: ./gradlew --no-daemon --stacktrace --build-cache --parallel --configure-on-demand assembleDevRelease assembleDevReldebug - name: Rename APKs - if: ${{ vars.UPLOAD_PR_ARTIFACTS == 'true' }} + if: ${{ env.UPLOAD_PR_ARTIFACTS == 'true' }} run: | mv app/build/outputs/apk/dev/release/app-dev-release.apk strato-pr${{ github.event.number }}-release.apk mv app/build/outputs/apk/dev/reldebug/app-dev-reldebug.apk strato-pr${{ github.event.number }}-reldebug.apk - name: Upload Release APK - if: ${{ vars.UPLOAD_PR_ARTIFACTS == 'true' }} + if: ${{ env.UPLOAD_PR_ARTIFACTS == 'true' }} uses: actions/upload-artifact@v4 with: name: strato-pr${{ github.event.number }}-release.apk path: strato-pr${{ github.event.number }}-release.apk - name: Upload Debug APK - if: ${{ vars.UPLOAD_PR_ARTIFACTS == 'true' }} + if: ${{ env.UPLOAD_PR_ARTIFACTS == 'true' }} uses: actions/upload-artifact@v4 with: name: strato-pr${{ github.event.number }}-reldebug.apk