Skip to content

Commit 80b5246

Browse files
K2GO-433 ci(release): build and archive the Play AAB
Build bundlePlayRelease in the release workflow (signed with the injected keystore), upload the signed AAB as a workflow artifact for the manual Play Console upload, and archive a historical copy to R2 (one object per release, keyed by the versioned filename). The AAB is not added to GitHub Releases: it is a publishing format, not a directly installable APK.
1 parent 9d17b24 commit 80b5246

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/android-release-build.yml‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ jobs:
7777
# In-APK traceability is unaffected: BuildConfig.GIT_SHA still records the commit.
7878
# K2GO-431: build both flavors. standard -> GitHub + R2 + OTA update.json (as before);
7979
# fdroid -> R2 only (F-Droid distributes it; it carries no in-app OTA).
80-
./gradlew assembleStandardRelease assembleFdroidRelease \
80+
# K2GO-433: also build the Play AAB (play flavor). It is uploaded as a workflow artifact for
81+
# the manual Play Console upload and archived to R2, but not to GitHub Releases: an AAB is a
82+
# publishing format, not a directly installable APK.
83+
./gradlew assembleStandardRelease assembleFdroidRelease bundlePlayRelease \
8184
-PversionSuffix="" \
8285
-Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \
8386
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
@@ -91,6 +94,15 @@ jobs:
9194
path: controller/**/build/outputs/apk/*/release/*.apk
9295
retention-days: 7
9396

97+
# K2GO-433: the signed Play AAB, for the manual Play Console upload (automated Play Developer API
98+
# publishing is a future follow-up once the app is live on Play).
99+
- name: Upload Play AAB Artifact
100+
uses: actions/upload-artifact@v6
101+
with:
102+
name: k2go-play-aab
103+
path: controller/app/build/outputs/bundle/playRelease/*.aab
104+
retention-days: 7
105+
94106
# --- GITHUB RELEASES ---
95107

96108
- name: Create GitHub Release
@@ -128,6 +140,17 @@ jobs:
128140
--content-type "application/vnd.android.package-archive"
129141
done
130142
143+
# K2GO-433: archive a historical copy of the Play AAB to R2 too (one object per release, keyed
144+
# by its versioned filename). An AAB is a publishing format (not installable), so this is an
145+
# archive / audit copy of exactly what we upload to Play; the Play Console upload stays manual.
146+
for aab in $(find . -path "*/build/outputs/bundle/playRelease/*.aab"); do
147+
filename=$(basename "$aab")
148+
echo "Uploading $filename to Cloudflare R2 ($BUCKET_NAME)..."
149+
aws s3 cp "$aab" "s3://$BUCKET_NAME/$filename" \
150+
--endpoint-url "https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com" \
151+
--content-type "application/octet-stream"
152+
done
153+
131154
# --- OTA MANIFEST (update.json) ---
132155
# ADFA-4984: publish the OTA manifest LAST, after the APKs are already in R2, so it never
133156
# points at a missing binary. update.json is a fixed key -> it overwrites the previous manifest

0 commit comments

Comments
 (0)