gowalk-cicd 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -103,6 +103,38 @@ in Play Console; every later run detects API readiness and uploads to the
103
103
  `internal` track automatically. Override the track or status with repository
104
104
  variables `GOOGLE_PLAY_TRACK` and `GOOGLE_PLAY_STATUS`.
105
105
 
106
+ ### Gradle daemon heap
107
+
108
+ A `gradle.properties` sized for a workstation does not fit a CI runner.
109
+ `-Xmx8G` with a 4 GB metaspace reserves 12 GB for the Gradle daemon alone,
110
+ before the Kotlin compile daemon spawns its own JVM — on a 16 GB runner the
111
+ build is killed mid-compile, and GitHub reports that as a **cancelled** job
112
+ rather than a failure, so it reads as a flake rather than an out-of-memory.
113
+
114
+ Before building, the Android job caps `-Xmx` at 4 GB and `MaxMetaspaceSize` at
115
+ 2 GB in the checkout, with a `::warning::` naming the original value. Projects
116
+ already at or below those numbers are left untouched. Linux only.
117
+
118
+ ### Google Play upload retry
119
+
120
+ A Play edit is a short-lived server-side object, and an AAB upload that runs
121
+ long enough outlives one:
122
+
123
+ ```
124
+ ##[error]This edit has expired, please create a new Edit.
125
+ ##[error]This Edit has been deleted.
126
+ ```
127
+
128
+ Neither says anything about the build, which is signed and retained by that
129
+ point. The upload step therefore runs with `continue-on-error` and a second
130
+ attempt follows when the first fails — a fresh edit succeeds. Both attempts
131
+ failing still fails the job.
132
+
133
+ One caveat this makes explicit: **nothing else should hold an edit open on the
134
+ same package while a deploy runs.** A script that polls `edits.insert` /
135
+ `edits.delete` to inspect track state will invalidate the edit the upload is
136
+ using, and the deploy fails for a reason that has nothing to do with the app.
137
+
106
138
  ### Runner disk space
107
139
 
108
140
  An `ubuntu-24.04` runner leaves roughly 14 GB free on `/`, and a release Flutter
@@ -1 +1 @@
1
- 1.0.20
1
+ 1.0.22
@@ -1 +1 @@
1
- 1.0.20
1
+ 1.0.22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gowalk-cicd",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Zero-config GitHub Actions delivery for iOS TestFlight and Android Google Play.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -183,6 +183,38 @@ jobs:
183
183
  echo "::add-mask::$GIT_PRIVATE_TOKEN"
184
184
  git config --global url."https://x-access-token:${GIT_PRIVATE_TOKEN}@github.com/".insteadOf "https://github.com/"
185
185
  echo "Configured authenticated github.com remotes for pub."
186
+ # A Gradle daemon sized for a workstation does not fit a CI runner. Asking
187
+ # for -Xmx8G with a 4G metaspace reserves 12 GB before the Kotlin compile
188
+ # daemon spawns its own JVM, and the runner is killed mid-compile — which
189
+ # GitHub reports as "cancelled", not as a failure, so it reads as a flake
190
+ # rather than an out-of-memory. Clamp to a size that leaves room, in the
191
+ # checkout only.
192
+ - name: Cap the Gradle daemon heap for this runner
193
+ if: ${{ steps.mode.outputs.mode == 'local' && runner.os == 'Linux' }}
194
+ shell: bash
195
+ env:
196
+ MAX_HEAP_GB: '4'
197
+ MAX_META_GB: '2'
198
+ run: |
199
+ shopt -s nullglob
200
+ for f in android/gradle.properties gradle.properties; do
201
+ [ -f "$f" ] || continue
202
+ before=$(grep -m1 '^org.gradle.jvmargs' "$f" || true)
203
+ [ -n "$before" ] || continue
204
+ heap=$(sed -nE 's/.*-Xmx([0-9]+)[Gg].*/\1/p' <<<"$before")
205
+ meta=$(sed -nE 's/.*MaxMetaspaceSize=([0-9]+)[Gg].*/\1/p' <<<"$before")
206
+ changed=""
207
+ if [ -n "$heap" ] && [ "$heap" -gt "$MAX_HEAP_GB" ]; then
208
+ sed -i -E "s/-Xmx${heap}[Gg]/-Xmx${MAX_HEAP_GB}G/" "$f"; changed=1
209
+ fi
210
+ if [ -n "$meta" ] && [ "$meta" -gt "$MAX_META_GB" ]; then
211
+ sed -i -E "s/MaxMetaspaceSize=${meta}[Gg]/MaxMetaspaceSize=${MAX_META_GB}G/" "$f"; changed=1
212
+ fi
213
+ if [ -n "$changed" ]; then
214
+ echo "::warning::$f asked for more heap than this runner has; capped it for this build only ($before)"
215
+ grep -m1 '^org.gradle.jvmargs' "$f"
216
+ fi
217
+ done
186
218
  # Same reason as the iOS job: apps using AppLocalizations must generate it
187
219
  # before anything analyses or compiles them. No-op for apps without l10n.
188
220
  - name: Generate localizations
@@ -226,7 +258,18 @@ jobs:
226
258
  python3 .github/actions/android-app/scripts/play_preflight.py \
227
259
  --package "$PACKAGE_NAME" \
228
260
  --service-account "$SERVICE_ACCOUNT"
261
+ # Play edits are short-lived server-side objects, and an AAB upload that runs
262
+ # long — a 100-200 MB bundle, a slow runner, or anything else holding an edit
263
+ # open on the same package — outlives one. The failures read as
264
+ # "This edit has expired, please create a new Edit." or "This Edit has been
265
+ # deleted." Neither says anything about the build, which is already signed and
266
+ # retained by this point; a second attempt opens a fresh edit and succeeds.
267
+ # Note this also means nothing else should be creating edits against these
268
+ # packages while a deploy runs — an external poller that opens and deletes an
269
+ # edit will invalidate the one this step is holding.
229
270
  - name: Upload Android release to Google Play
271
+ id: play-upload
272
+ continue-on-error: true
230
273
  if: ${{ steps.mode.outputs.mode == 'local' && steps.play.outputs.ready == 'true' }}
231
274
  uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
232
275
  with:
@@ -243,3 +286,15 @@ jobs:
243
286
  # files (e.g. whatsnew-en-US, whatsnew-de-DE) and they ship with every
244
287
  # release. Empty when the directory is absent — the action skips it.
245
288
  whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}
289
+
290
+ - name: Retry Google Play upload
291
+ if: ${{ steps.mode.outputs.mode == 'local' && steps.play.outputs.ready == 'true' && steps.play-upload.outcome == 'failure' }}
292
+ uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
293
+ with:
294
+ serviceAccountJson: ${{ steps.android.outputs.play-service-account }}
295
+ packageName: ${{ steps.android.outputs.package-name }}
296
+ releaseFiles: ${{ steps.android.outputs.bundle-path }}
297
+ tracks: ${{ vars.GOOGLE_PLAY_TRACK || 'internal' }}
298
+ status: ${{ vars.GOOGLE_PLAY_STATUS || 'completed' }}
299
+ userFraction: ${{ vars.GOOGLE_PLAY_STATUS == 'inProgress' && (vars.GOOGLE_PLAY_USER_FRACTION || '0.2') || '' }}
300
+ whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}