Skip to content

Commit

Permalink
Add Android Bundle building in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualPokePlayer committed Apr 10, 2024
1 parent 8d6aa30 commit a7d7aed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .ci/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ cd ..
mkdir output/$TARGET_RID
mkdir output/$TARGET_RID/publish
cp -a -T android/app/build/outputs/apk/release/app-release.apk output/$TARGET_RID/publish/GSR.apk

# Also possibly build an app bundle (for Play Store submission)
if [ -f $HOME/gsr-upload-keystore.jks ]; then
cd android
./gradlew bundleRelease -Pkeystore="$HOME/gsr-upload-keystore.jks" -Pstorepass="$ANDROID_UPLOAD_STOREPASS" -Pkeyalias="$ANDROID_UPLOAD_KEYALIAS" -Pkeypass="$ANDROID_UPLOAD_KEYPASS"
cd ..
cp -a -T android/app/build/outputs/bundle/release/app-release.aab output/$TARGET_RID/publish/GSR.aab
fi
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,21 @@ jobs:
ANDROID_RELEASE_KEYSTORE: ${{ secrets.ANDROID_RELEASE_KEYSTORE }}
run: |
echo $ANDROID_RELEASE_KEYSTORE | base64 --decode > $HOME/gsr-release-keystore.jks
- name: Setup Android upload keystore
if: matrix.platform.rid == 'android' && startsWith(github.ref, 'refs/tags/')
env:
ANDROID_UPLOAD_KEYSTORE: ${{ secrets.ANDROID_UPLOAD_KEYSTORE }}
run: |
echo $ANDROID_UPLOAD_KEYSTORE | base64 --decode > $HOME/gsr-upload-keystore.jks
- name: Run CI build script
env:
TARGET_RID: ${{ matrix.platform.rid }}
ANDROID_RELEASE_STOREPASS: ${{ secrets.ANDROID_RELEASE_STOREPASS }}
ANDROID_RELEASE_KEYALIAS: ${{ secrets.ANDROID_RELEASE_KEYALIAS }}
ANDROID_RELEASE_KEYPASS: ${{ secrets.ANDROID_RELEASE_KEYPASS }}
ANDROID_UPLOAD_STOREPASS: ${{ secrets.ANDROID_UPLOAD_STOREPASS }}
ANDROID_UPLOAD_KEYALIAS: ${{ secrets.ANDROID_UPLOAD_KEYALIAS }}
ANDROID_UPLOAD_KEYPASS: ${{ secrets.ANDROID_UPLOAD_KEYPASS }}
run: |
cd GSR/.ci
${{ matrix.platform.build_script }}
Expand Down

0 comments on commit a7d7aed

Please sign in to comment.