Skip to content

Commit 8a520fd

Browse files
Add Android App Bundle (.aab) to release workflow
The release workflow now builds and collects Android App Bundles (.aab) in addition to APKs. This enables distribution via Google Play and other platforms that require .aab files.
1 parent 8cc9608 commit 8a520fd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
- target: Android
2323
os: ubuntu-latest
2424
artifact_name: release-Android
25-
artifact_path: build/app/outputs/flutter-apk/*.apk
25+
artifact_path: |
26+
build/app/outputs/flutter-apk/*.apk
27+
build/app/outputs/bundle/release/*.aab
2628
- target: Windows
2729
os: windows-latest
2830
artifact_name: release-Windows
@@ -110,18 +112,23 @@ jobs:
110112
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
111113
echo "arch=$(echo "$RUNNER_ARCH" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
112114
113-
# Build Android .apk
115+
# Build Android .apk & .aab
114116
- name: Build Android
115117
if: matrix.target == 'Android'
116118
run: |
117119
flutter build apk --release
118120
flutter build apk --release --split-per-abi
121+
flutter build appbundle --release --dart-define=BUILD_TYPE=appbundle
122+
119123
cd build/app/outputs/flutter-apk
120124
mv app-release.apk CloudOTP-${{ steps.get_version.outputs.version }}-android-universal.apk
121125
mv app-arm64-v8a-release.apk CloudOTP-${{ steps.get_version.outputs.version }}-android-arm64-v8a.apk
122126
mv app-armeabi-v7a-release.apk CloudOTP-${{ steps.get_version.outputs.version }}-android-armeabi-v7a.apk
123127
mv app-x86_64-release.apk CloudOTP-${{ steps.get_version.outputs.version }}-android-x86_64.apk
124128
129+
cd ../bundle/release
130+
mv app-release.aab CloudOTP-${{ steps.get_version.outputs.version }}-android.aab
131+
125132
# Build Windows .zip
126133
- name: Build Windows
127134
if: matrix.target == 'Windows'
@@ -211,6 +218,7 @@ jobs:
211218
run: |
212219
mkdir -p /tmp/artifacts/final
213220
mv /tmp/artifacts/release-Android/*.apk /tmp/artifacts/final/
221+
mv /tmp/artifacts/release-Android/*.aab /tmp/artifacts/final/
214222
mv /tmp/artifacts/release-Windows/*.zip /tmp/artifacts/final/
215223
mv /tmp/artifacts/release-Windows/*.exe /tmp/artifacts/final/
216224
mv /tmp/artifacts/release-Linux/*.deb /tmp/artifacts/final/

0 commit comments

Comments
 (0)