ci: build release AAB only for published releases
This commit is contained in:
@@ -5,6 +5,9 @@ on:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -54,6 +57,7 @@ jobs:
|
||||
printf 'sdk.dir=%s/.android/sdk\n' "$HOME" > local.properties
|
||||
|
||||
- name: Build debug APK
|
||||
if: github.event_name != 'release'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
@@ -62,6 +66,7 @@ jobs:
|
||||
./gradlew --no-daemon clean assembleDebug
|
||||
|
||||
- name: Build release AAB
|
||||
if: github.event_name == 'release'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
@@ -70,6 +75,7 @@ jobs:
|
||||
./gradlew --no-daemon bundleRelease
|
||||
|
||||
- name: Upload debug APK
|
||||
if: github.event_name != 'release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: debug-apk
|
||||
@@ -77,6 +83,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload release AAB
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-aab
|
||||
|
||||
Reference in New Issue
Block a user