|
77 | 77 | # In-APK traceability is unaffected: BuildConfig.GIT_SHA still records the commit. |
78 | 78 | # K2GO-431: build both flavors. standard -> GitHub + R2 + OTA update.json (as before); |
79 | 79 | # 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 \ |
81 | 84 | -PversionSuffix="" \ |
82 | 85 | -Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \ |
83 | 86 | -Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \ |
|
91 | 94 | path: controller/**/build/outputs/apk/*/release/*.apk |
92 | 95 | retention-days: 7 |
93 | 96 |
|
| 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 | + |
94 | 106 | # --- GITHUB RELEASES --- |
95 | 107 |
|
96 | 108 | - name: Create GitHub Release |
@@ -128,6 +140,17 @@ jobs: |
128 | 140 | --content-type "application/vnd.android.package-archive" |
129 | 141 | done |
130 | 142 |
|
| 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 | +
|
131 | 154 | # --- OTA MANIFEST (update.json) --- |
132 | 155 | # ADFA-4984: publish the OTA manifest LAST, after the APKs are already in R2, so it never |
133 | 156 | # points at a missing binary. update.json is a fixed key -> it overwrites the previous manifest |
|
0 commit comments