π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[ensu] gate android signing and aab steps
Prateek Sunal2d7ee4b31c15
diff --git a/.github/workflows/ensu-release.yml b/.github/workflows/ensu-release.ymlindex 52eff971ca..3e61e455d9 100644--- a/.github/workflows/ensu-release.yml+++ b/.github/workflows/ensu-release.yml@@ -118,6 +118,9 @@ jobs:build-android:runs-on: ubuntu-latestneeds: release-desktop+ env:+ HAS_ANDROID_SIGNING: ${{ secrets.SIGNING_KEY_ENSU != '' && secrets.SIGNING_STORE_PASSWORD_ENSU != '' && secrets.SIGNING_KEY_ALIAS_ENSU != '' && secrets.SIGNING_KEY_PASSWORD_ENSU != '' }}+ HAS_PLAYSTORE_SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT_JSON != '' }}defaults:run:@@ -160,7 +163,13 @@ jobs:ANDROID_HOME: ${{ env.ANDROID_HOME }}NDK_VERSION: ${{ env.NDK_VERSION }}+ - name: Print Android release capabilities+ run: |+ echo "HAS_ANDROID_SIGNING=${HAS_ANDROID_SIGNING}"+ echo "HAS_PLAYSTORE_SERVICE_ACCOUNT=${HAS_PLAYSTORE_SERVICE_ACCOUNT}"+- name: Setup signing keys+ if: env.HAS_ANDROID_SIGNING == 'true'run: |echo "${{ secrets.SIGNING_KEY_ENSU }}" | base64 -d > ensu-release.keystorecat > key.properties << EOF@@ -170,15 +179,27 @@ jobs:keyPassword=${{ secrets.SIGNING_KEY_PASSWORD_ENSU }}EOF- - name: Build release APK and AAB+ - name: Build signed release APK and AAB+ if: env.HAS_ANDROID_SIGNING == 'true'run: ./gradlew :app-ui:assembleRelease :app-ui:bundleRelease- - name: Collect Android artifacts+ - name: Build unsigned debug APK (fallback)+ if: env.HAS_ANDROID_SIGNING != 'true'+ run: ./gradlew :app-ui:assembleDebug++ - name: Collect Android artifacts (signed)+ if: env.HAS_ANDROID_SIGNING == 'true'run: |mkdir -p artifactscp app-ui/build/outputs/apk/release/app-ui-release.apk artifacts/ensu-${{ github.ref_name }}.apkcp app-ui/build/outputs/bundle/release/app-ui-release.aab artifacts/ensu-${{ github.ref_name }}.aab+ - name: Collect Android artifacts (unsigned fallback)+ if: env.HAS_ANDROID_SIGNING != 'true'+ run: |+ mkdir -p artifacts+ cp app-ui/build/outputs/apk/debug/app-ui-debug.apk artifacts/ensu-${{ github.ref_name }}-unsigned.apk+- name: Attach Android artifacts to draft GitHub releaseif: startsWith(github.ref, 'refs/tags/ensu-v')uses: ncipollo/release-action@v1@@ -195,6 +216,7 @@ jobs:path: mobile/native/android/apps/ensu/artifacts/*- name: Upload AAB to PlayStore+ if: env.HAS_ANDROID_SIGNING == 'true' && env.HAS_PLAYSTORE_SERVICE_ACCOUNT == 'true'uses: r0adkll/upload-google-play@v1with:serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}@@ -204,7 +226,7 @@ jobs:status: draft- name: Notify Discord- if: success()+ if: success() && env.HAS_ANDROID_SIGNING == 'true' && env.HAS_PLAYSTORE_SERVICE_ACCOUNT == 'true' && secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK != ''uses: sarisia/actions-status-discord@v1with:webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}