Skip to content

Commit 8f5fd3d

Browse files
K2GO-433 ci(release): build and archive the Play AAB
Build bundlePlayRelease (signed with the injected keystore) and archive the AAB to R2 (backup copy, one object per release by versioned filename). Also drop the redundant GitHub Actions APK artifact upload: the release APKs already go to R2 and the GitHub Release, so the short-lived artifact only consumed quota.
1 parent 9d17b24 commit 8f5fd3d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,14 @@ 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); archived to R2 below.
81+
./gradlew assembleStandardRelease assembleFdroidRelease bundlePlayRelease \
8182
-PversionSuffix="" \
8283
-Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \
8384
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
8485
-Pandroid.injected.signing.key.alias=$KEY_ALIAS \
8586
-Pandroid.injected.signing.key.password=$KEY_PASSWORD
8687
87-
- name: Upload APK Artifacts
88-
uses: actions/upload-artifact@v6
89-
with:
90-
name: k2go-apks-release
91-
path: controller/**/build/outputs/apk/*/release/*.apk
92-
retention-days: 7
93-
9488
# --- GITHUB RELEASES ---
9589

9690
- name: Create GitHub Release
@@ -128,6 +122,15 @@ jobs:
128122
--content-type "application/vnd.android.package-archive"
129123
done
130124
125+
# K2GO-433: archive the Play AAB to R2 (backup copy, one object per release by versioned filename).
126+
for aab in $(find . -path "*/build/outputs/bundle/playRelease/*.aab"); do
127+
filename=$(basename "$aab")
128+
echo "Uploading $filename to Cloudflare R2 ($BUCKET_NAME)..."
129+
aws s3 cp "$aab" "s3://$BUCKET_NAME/$filename" \
130+
--endpoint-url "https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com" \
131+
--content-type "application/octet-stream"
132+
done
133+
131134
# --- OTA MANIFEST (update.json) ---
132135
# ADFA-4984: publish the OTA manifest LAST, after the APKs are already in R2, so it never
133136
# points at a missing binary. update.json is a fixed key -> it overwrites the previous manifest

0 commit comments

Comments
 (0)