CI: Generate app bundles

This commit is contained in:
Connor McLaughlin 2021-06-06 14:46:07 +10:00
parent c4cfb40f7b
commit 4435851276

View file

@ -212,7 +212,36 @@ jobs:
with: with:
fetch-depth: 0 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 shell: bash
run: | run: |
cd android cd android
@ -232,8 +261,7 @@ jobs:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
shell: bash shell: bash
run: | run: |
cd android mv android/app/build/outputs/apk/release/app-release-unsigned-signed.apk duckstation-android.apk
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk
- name: Upload APK - name: Upload APK
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store' 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-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt/duckstation-qt-x64.AppImage
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
android/duckstation-android.aab
android/duckstation-android.apk android/duckstation-android.apk
- name: Create dev release - name: Create dev release
@ -355,6 +384,7 @@ jobs:
linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt/duckstation-qt-x64.AppImage
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
android/duckstation-android.aab
android/duckstation-android.apk android/duckstation-android.apk
@ -376,4 +406,5 @@ jobs:
prerelease: true prerelease: true
title: "Latest Play Store Build" title: "Latest Play Store Build"
files: | files: |
android/duckstation-android.aab
android/duckstation-android.apk android/duckstation-android.apk