Create and upload universal APK during release (#190)

This commit is contained in:
Ian VanSchooten 2024-10-25 12:20:04 -04:00 committed by GitHub
parent 1a968bffb4
commit 6d23a0ca35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -32,6 +32,9 @@ jobs:
with: with:
flutter-version: '3.24.1' flutter-version: '3.24.1'
- name: Setup bundletool for APK generation
uses: amyu/setup-bundletool@f7a6fdd8e04bb23d2fdf3c2f60c9257a6298a40a
- name: Install the appstore connect key material - name: Install the appstore connect key material
env: env:
AC_API_KEY_SECRET_BASE64: ${{ secrets.AC_API_KEY_SECRET_BASE64 }} AC_API_KEY_SECRET_BASE64: ${{ secrets.AC_API_KEY_SECRET_BASE64 }}
@ -121,6 +124,20 @@ jobs:
exit 1 exit 1
fi fi
- name: Generate universal APK
env:
TOKEN: ${{ secrets.MACHINE_USER_PAT }}
GOOGLE_PLAY_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_KEYSTORE_PASSWORD }}
run: |
bundletool build-apks \
--bundle=build/app/outputs/bundle/release/app-release.aab \
--output=build/app/outputs/apk/release/MobileNebula.apks \
--mode=universal \
--ks=$GOOGLE_PLAY_KEYSTORE_PATH \
--ks-key-alias=key \
--ks-pass=pass:$GOOGLE_PLAY_KEYSTORE_PASSWORD
unzip -p build/app/outputs/apk/release/MobileNebula.apks universal.apk > build/app/outputs/apk/release/MobileNebula.apk
- name: Collect Android artifacts - name: Collect Android artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -156,6 +173,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
files: | files: |
build/app/outputs/bundle/release/MobileNebula.aab build/app/outputs/bundle/release/MobileNebula.aab
build/app/outputs/apk/release/MobileNebula.apk
ios/MobileNebula.ipa ios/MobileNebula.ipa
- name: Create Sentry release - name: Create Sentry release