Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
izzy2fancy authored Apr 28, 2024
1 parent 83111c2 commit c1bcea1
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c1bcea1

Please sign in to comment.