From cb983da990a39599dad39a89c76ebcb22bd16b9c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sat, 27 Jul 2024 04:42:21 -0400 Subject: [PATCH] fix: cd apk upload --- .github/workflows/release.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a46b3e..0242465 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,17 +85,20 @@ jobs: # add fdroid flavor for apk upload - name: Build Fdroid Release APK if: ${{ inputs.release_type != '' && inputs.release_type != 'nightly' }} - run: | - ./gradlew :app:assembleFdroidRelease -x test - echo "APK_PATH=$(find . -regex '^.*/build/outputs/apk/fdroid/release/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT + run: ./gradlew :app:assembleFdroidRelease -x test + - name: Build Fdroid Nightly APK if: ${{ inputs.release_type == '' || inputs.release_type == 'nightly' }} - run: | - ./gradlew :app:assembleFdroidNightly -x test - echo "APK_PATH=$(find . -regex '^.*/build/outputs/apk/fdroid/nightly/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT + run: ./gradlew :app:assembleFdroidNightly -x test + + - if: ${{ inputs.release_type == '' || inputs.release_type == 'nightly' }} + run: echo "APK_PATH=$(find . -regex '^.*/build/outputs/apk/fdroid/nightly/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT + - if: ${{ inputs.release_type != '' && inputs.release_type != 'nightly' }} + run: echo "APK_PATH=$(find . -regex '^.*/build/outputs/apk/fdroid/release/.*\.apk$' -type f | head -1)" >> $GITHUB_OUTPUT - name: Get version code + if: ${{ inputs.release_type == 'release' || inputs.release_type == 'prerelease' }} run: | version_code=$(grep "VERSION_CODE" buildSrc/src/main/kotlin/Constants.kt | awk '{print $5}' | tr -d '\n') echo "VERSION_CODE=$version_code" >> $GITHUB_ENV