Skip to content

Commit 6aef5f7

Browse files
committed
feat: build per-ABI split APKs
Decreases the file size of APKs.
1 parent b2b927b commit 6aef5f7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/build-companion-unstable.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ jobs:
3333
echo storePassword=\${{ secrets.ANDROID_BUILD_STORE_PASSWORD }} >> ${{ env.working-directory }}/android/key.properties
3434
echo keyAlias=\${{ secrets.ANDROID_BUILD_KEY_ALIAS }} >> ${{ env.working-directory }}/android/key.properties
3535
echo storeFile=/home/runner/.android/release.keystore >> ${{ env.working-directory }}/android/key.properties
36-
- run: flutter build apk --release
36+
- name: Build fat APK
37+
run: flutter build apk --release
3738
working-directory: ${{ env.working-directory }}
39+
- name: Build split per ABI APKs
40+
run: flutter build apk --release --split-per-abi
3841
- name: Delete keystore and other secrets
3942
run: |
4043
rm -rf /home/runner/.android
@@ -45,7 +48,7 @@ jobs:
4548

4649
- uses: ncipollo/release-action@v1
4750
with:
48-
artifacts: "Open_Android_Backup_Unstable_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk"
51+
artifacts: "Open_Android_Backup_Unstable_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk,companion_app/build/app/outputs/apk/release/app-armeabi-v7a-release.apk,companion_app/build/app/outputs/apk/release/app-arm64-v8a-release.apk,companion_app/build/app/outputs/apk/release/app-x86_64-release.apk"
4952
allowUpdates: true
5053
artifactErrorsFailBuild: true
5154
generateReleaseNotes: true

.github/workflows/build-tagged.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ jobs:
3434
echo storePassword=\${{ secrets.ANDROID_BUILD_STORE_PASSWORD }} >> ${{ env.working-directory }}/android/key.properties
3535
echo keyAlias=\${{ secrets.ANDROID_BUILD_KEY_ALIAS }} >> ${{ env.working-directory }}/android/key.properties
3636
echo storeFile=/home/runner/.android/release.keystore >> ${{ env.working-directory }}/android/key.properties
37-
- run: flutter build apk --release
37+
- name: Build fat APK
38+
run: flutter build apk --release
39+
working-directory: ${{ env.working-directory }}
40+
- name: Build split per ABI APKs
41+
run: flutter build apk --release --split-per-abi
3842
working-directory: ${{ env.working-directory }}
3943
- name: Delete keystore and other secrets
4044
run: |
@@ -47,7 +51,7 @@ jobs:
4751

4852
- uses: ncipollo/release-action@v1
4953
with:
50-
artifacts: "Open_Android_Backup_${{ github.ref_name }}_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk"
54+
artifacts: "Open_Android_Backup_${{ github.ref_name }}_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk,companion_app/build/app/outputs/apk/release/app-armeabi-v7a-release.apk,companion_app/build/app/outputs/apk/release/app-arm64-v8a-release.apk,companion_app/build/app/outputs/apk/release/app-x86_64-release.apk"
5155
allowUpdates: false
5256
artifactErrorsFailBuild: true
5357
generateReleaseNotes: true

0 commit comments

Comments
 (0)