From 314b2519a501a9b09ba2c7a643e3f92ba34d42c3 Mon Sep 17 00:00:00 2001 From: linonetwo Date: Fri, 16 Feb 2024 22:18:05 +0800 Subject: [PATCH] Update build-f-droid-apk.yml --- .github/workflows/build-f-droid-apk.yml | 53 +++++++++++++------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-f-droid-apk.yml b/.github/workflows/build-f-droid-apk.yml index 414afcd..e09919d 100644 --- a/.github/workflows/build-f-droid-apk.yml +++ b/.github/workflows/build-f-droid-apk.yml @@ -90,36 +90,12 @@ jobs: # - name: Remove prorietary bits (for fix f-droid) # run: npx zx scripts/fit-f-droid.mjs - # - name: Build APK - # run: | - # cd android - # ./gradlew clean - # ./gradlew assembleRelease --no-daemon --warning-mode all - - # ## sign generated apk - # - name: Sign APK - # id: sign_app_apk - # uses: r0adkll/sign-android-release@v1 - # with: - # releaseDirectory: android/app/build/outputs/apk/release - # signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} - # alias: ${{ secrets.ANDROID_ALIAS }} - # keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} - # keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} - # env: - # BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }} - - name: Build AAB run: | cd android # ./gradlew clean ./gradlew bundleRelease --no-daemon --warning-mode all - - name: Show artifacts - run: | - ls android/app/build/outputs/bundle/release/ - # ls android/app/build/outputs/apk/release/ - - name: Sign AAB id: sign_app_aab uses: r0adkll/sign-android-release@v1 @@ -132,6 +108,31 @@ jobs: env: BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }} + - name: Build APK + run: | + cd android + ./gradlew clean + ./gradlew assembleRelease --no-daemon --warning-mode all + + ## sign generated apk + - name: Sign APK + id: sign_app_apk + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: android/app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} + alias: ${{ secrets.ANDROID_ALIAS }} + keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} + env: + BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }} + + + - name: Show artifacts + run: | + ls android/app/build/outputs/apk/release/ + ls android/app/build/outputs/bundle/release/ + - name: Create Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -139,7 +140,7 @@ jobs: draft: true generate_release_notes: true files: | - # android/app/build/outputs/apk/release/app-release-signed.apk - android/app/build/outputs/bundle/release/app-release-signed.aab + android/app/build/outputs/apk/release/app-release-signed.apk + android/app/build/outputs/bundle/release/app-release.aab env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}