From 44358512761c70725e25a667c842f4a754ba4748 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 6 Jun 2021 14:46:07 +1000 Subject: [PATCH] CI: Generate app bundles --- .github/workflows/rolling-release.yml | 37 ++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index f72d56a10..1317c25d2 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -212,7 +212,36 @@ jobs: with: fetch-depth: 0 - - name: Compile with Gradle + - name: Compile App Bundle with Gradle + shell: bash + run: | + cd android + ./gradlew bundleRelease + + - name: Sign App Bundle + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: android/app/build/outputs/bundle/release + signingKeyBase64: ${{ secrets.APK_SIGNING_KEY }} + alias: ${{ secrets.APK_KEY_ALIAS }} + keyStorePassword: ${{ secrets.APK_KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.APK_KEY_PASSWORD }} + + - name: Rename App Bundle + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' + shell: bash + run: | + mv android/app/build/outputs/bundle/release/app-release.aab duckstation-android.aab + + - name: Upload App Bundle + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' + uses: actions/upload-artifact@v1 + with: + name: "android" + path: "duckstation-android.aab" + + - name: Compile APK shell: bash run: | cd android @@ -232,8 +261,7 @@ jobs: if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' shell: bash run: | - cd android - mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk + mv android/app/build/outputs/apk/release/app-release-unsigned-signed.apk duckstation-android.apk - name: Upload APK if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' @@ -336,6 +364,7 @@ jobs: linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync + android/duckstation-android.aab android/duckstation-android.apk - name: Create dev release @@ -355,6 +384,7 @@ jobs: linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync + android/duckstation-android.aab android/duckstation-android.apk @@ -376,4 +406,5 @@ jobs: prerelease: true title: "Latest Play Store Build" files: | + android/duckstation-android.aab android/duckstation-android.apk