Use a repository variable to control CI artifact upload for PRs

This commit is contained in:
lynxnb 2024-03-01 10:52:44 +01:00 committed by Niccolò Betto
parent d5d6e677ca
commit a503ca19bc

View file

@ -55,17 +55,20 @@ jobs:
run: ./gradlew --no-daemon --stacktrace --build-cache --parallel --configure-on-demand assembleDevRelease assembleDevReldebug
- name: Rename APKs
if: ${{ vars.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' }}
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' }}
uses: actions/upload-artifact@v4
with:
name: strato-pr${{ github.event.number }}-reldebug.apk