gowalk-cicd 1.0.19 → 1.0.21

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,26 @@ 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
+ ### Google Play upload retry
107
+
108
+ A Play edit is a short-lived server-side object, and an AAB upload that runs
109
+ long enough outlives one:
110
+
111
+ ```
112
+ ##[error]This edit has expired, please create a new Edit.
113
+ ##[error]This Edit has been deleted.
114
+ ```
115
+
116
+ Neither says anything about the build, which is signed and retained by that
117
+ point. The upload step therefore runs with `continue-on-error` and a second
118
+ attempt follows when the first fails — a fresh edit succeeds. Both attempts
119
+ failing still fails the job.
120
+
121
+ One caveat this makes explicit: **nothing else should hold an edit open on the
122
+ same package while a deploy runs.** A script that polls `edits.insert` /
123
+ `edits.delete` to inspect track state will invalidate the edit the upload is
124
+ using, and the deploy fails for a reason that has nothing to do with the app.
125
+
106
126
  ### Runner disk space
107
127
 
108
128
  An `ubuntu-24.04` runner leaves roughly 14 GB free on `/`, and a release Flutter
@@ -143,8 +163,13 @@ the token lives in one revocable place:
143
163
  gh secret set GIT_PRIVATE_TOKEN --repo my-org/my-app
144
164
  ```
145
165
 
146
- Without the secret the step is skipped, so repos that do not need it are
147
- unaffected.
166
+ Without the secret the step prints a note and exits 0, so repos that do not need
167
+ it are unaffected.
168
+
169
+ > The emptiness check happens in the shell rather than in the step's `if:`.
170
+ > GitHub does not expose the `secrets` context to a step-level `if:` — putting
171
+ > it there does not evaluate to false, it makes the entire workflow file invalid
172
+ > and every run fails before any job starts.
148
173
 
149
174
  ### Localized release notes
150
175
 
@@ -1 +1 @@
1
- 1.0.19
1
+ 1.0.21
@@ -1 +1 @@
1
- 1.0.19
1
+ 1.0.21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gowalk-cicd",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Zero-config GitHub Actions delivery for iOS TestFlight and Android Google Play.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -166,14 +166,23 @@ jobs:
166
166
  # https://github.com/<org>/<repo>.git URLs resolve on the runner, so the
167
167
  # token lives in one revocable place. No secret, no step — repos that do
168
168
  # not need it are unaffected.
169
+ # The `secrets` context is NOT available in a step-level `if:` — using it
170
+ # there does not evaluate false, it makes the whole workflow file invalid
171
+ # and every run fails before any job starts. So the secret comes in as env
172
+ # and the emptiness check happens in the shell.
169
173
  - name: Authenticate private git dependencies
170
- if: ${{ steps.mode.outputs.mode == 'local' && steps.flutter.outputs.enabled == 'true' && secrets.GIT_PRIVATE_TOKEN != '' }}
174
+ if: ${{ steps.mode.outputs.mode == 'local' && steps.flutter.outputs.enabled == 'true' }}
171
175
  shell: bash
172
176
  env:
173
177
  GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
174
178
  run: |
175
- git config --global url."https://x-access-token:${GIT_PRIVATE_TOKEN}@github.com/".insteadOf "https://github.com/"
179
+ if [ -z "${GIT_PRIVATE_TOKEN:-}" ]; then
180
+ echo "No GIT_PRIVATE_TOKEN secret; private git dependencies must carry their own credentials."
181
+ exit 0
182
+ fi
176
183
  echo "::add-mask::$GIT_PRIVATE_TOKEN"
184
+ git config --global url."https://x-access-token:${GIT_PRIVATE_TOKEN}@github.com/".insteadOf "https://github.com/"
185
+ echo "Configured authenticated github.com remotes for pub."
177
186
  # Same reason as the iOS job: apps using AppLocalizations must generate it
178
187
  # before anything analyses or compiles them. No-op for apps without l10n.
179
188
  - name: Generate localizations
@@ -217,7 +226,18 @@ jobs:
217
226
  python3 .github/actions/android-app/scripts/play_preflight.py \
218
227
  --package "$PACKAGE_NAME" \
219
228
  --service-account "$SERVICE_ACCOUNT"
229
+ # Play edits are short-lived server-side objects, and an AAB upload that runs
230
+ # long — a 100-200 MB bundle, a slow runner, or anything else holding an edit
231
+ # open on the same package — outlives one. The failures read as
232
+ # "This edit has expired, please create a new Edit." or "This Edit has been
233
+ # deleted." Neither says anything about the build, which is already signed and
234
+ # retained by this point; a second attempt opens a fresh edit and succeeds.
235
+ # Note this also means nothing else should be creating edits against these
236
+ # packages while a deploy runs — an external poller that opens and deletes an
237
+ # edit will invalidate the one this step is holding.
220
238
  - name: Upload Android release to Google Play
239
+ id: play-upload
240
+ continue-on-error: true
221
241
  if: ${{ steps.mode.outputs.mode == 'local' && steps.play.outputs.ready == 'true' }}
222
242
  uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
223
243
  with:
@@ -234,3 +254,15 @@ jobs:
234
254
  # files (e.g. whatsnew-en-US, whatsnew-de-DE) and they ship with every
235
255
  # release. Empty when the directory is absent — the action skips it.
236
256
  whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}
257
+
258
+ - name: Retry Google Play upload
259
+ if: ${{ steps.mode.outputs.mode == 'local' && steps.play.outputs.ready == 'true' && steps.play-upload.outcome == 'failure' }}
260
+ uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
261
+ with:
262
+ serviceAccountJson: ${{ steps.android.outputs.play-service-account }}
263
+ packageName: ${{ steps.android.outputs.package-name }}
264
+ releaseFiles: ${{ steps.android.outputs.bundle-path }}
265
+ tracks: ${{ vars.GOOGLE_PLAY_TRACK || 'internal' }}
266
+ status: ${{ vars.GOOGLE_PLAY_STATUS || 'completed' }}
267
+ userFraction: ${{ vars.GOOGLE_PLAY_STATUS == 'inProgress' && (vars.GOOGLE_PLAY_USER_FRACTION || '0.2') || '' }}
268
+ whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}