gowalk-cicd 1.0.24 → 1.0.26

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
@@ -145,6 +145,26 @@ Before building, the Android job caps `-Xmx` at 4 GB and `MaxMetaspaceSize` at
145
145
  2 GB in the checkout, with a `::warning::` naming the original value. Projects
146
146
  already at or below those numbers are left untouched. Linux only.
147
147
 
148
+ ### When Play will not accept a release for review
149
+
150
+ Once an app has changes that Google requires a person to submit — most often
151
+ after a policy rejection — the API refuses to commit them:
152
+
153
+ ```
154
+ Changes cannot be sent for review automatically. Please set the query parameter
155
+ changesNotSentForReview to true. Once committed, the changes in this edit can be
156
+ sent for review from the Google Play Console UI.
157
+ ```
158
+
159
+ That fails the whole upload, so the bundle you just built never reaches Play at
160
+ all. The retry re-uploads with `changesNotSentForReview`, which lands the bundle
161
+ and leaves it waiting, then emits a `::warning::` naming the package. Someone
162
+ then presses **Send changes for review** on that app's Publishing overview page.
163
+ There is no API for that press — it is the one step Google deliberately reserves
164
+ for a human, and no amount of tooling removes it.
165
+
166
+ In the ordinary case the first upload submits normally and the retry is skipped.
167
+
148
168
  ### Google Play upload retry
149
169
 
150
170
  A Play edit is a short-lived server-side object, and an AAB upload that runs
@@ -1 +1 @@
1
- 1.0.24
1
+ 1.0.26
@@ -101,8 +101,22 @@ def _entitlements_from_configs(
101
101
  resolve exactly, and then only accepted when the resulting file is really
102
102
  there — a missed entitlements file costs a clearer error, a wrong one costs
103
103
  a wrong App ID edit.
104
+
105
+ Only the ARCHIVE configuration counts: CI archives Release, so its
106
+ CODE_SIGN_ENTITLEMENTS (falling back to Profile, then to every config
107
+ only when neither exists) decides provisioning. An entitlement wired
108
+ into Debug alone — the standard way to simulator-test an Apple-granted
109
+ capability (CarPlay) before the grant lands — must NOT force that
110
+ capability onto the App ID for the archive.
104
111
  """
105
- for cid in config_ids:
112
+ by_name = {
113
+ ((objects.get(cid) or {}).get("name") or "").lower(): cid
114
+ for cid in config_ids
115
+ }
116
+ archive_cid = by_name.get("release") or by_name.get("profile")
117
+ candidates = [archive_cid] if archive_cid else config_ids
118
+
119
+ for cid in candidates:
106
120
  cfg = objects.get(cid) or {}
107
121
  settings = cfg.get("buildSettings") or {}
108
122
  value = (settings.get("CODE_SIGN_ENTITLEMENTS") or "").strip().strip('"')
@@ -76,5 +76,78 @@ class EntitlementsFromConfigsTest(unittest.TestCase):
76
76
  _entitlements_from_configs({"cfg": {"buildSettings": {}}}, ["cfg"]), "")
77
77
 
78
78
 
79
+
80
+
81
+ class ReleaseConfigPriorityTest(unittest.TestCase):
82
+ """Release must drive provisioning: an entitlement wired into Debug only
83
+ (the pre-grant CarPlay simulator-testing setup) must not require the
84
+ capability on the App ID for the Release archive."""
85
+
86
+ def _objects(self):
87
+ return {
88
+ "dbg": {
89
+ "name": "Debug",
90
+ "buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Debug.entitlements"},
91
+ },
92
+ "rel": {"name": "Release", "buildSettings": {}},
93
+ "prof": {"name": "Profile", "buildSettings": {}},
94
+ }
95
+
96
+ def test_debug_only_entitlements_are_invisible_when_release_has_none(self):
97
+ # The pre-grant CarPlay setup: entitlements wired into Debug for the
98
+ # simulator, Release deliberately unwired so the archive needs no
99
+ # Apple-granted capability. The archive config decides — result "".
100
+ objects = self._objects()
101
+ self.assertEqual(
102
+ _entitlements_from_configs(
103
+ objects, ["dbg", "rel", "prof"], target_name="App",
104
+ base=Path("/nonexistent")),
105
+ "",
106
+ )
107
+
108
+ def test_all_configs_scanned_when_no_release_or_profile_exists(self):
109
+ objects = {
110
+ "a": {"name": "Staging", "buildSettings": {}},
111
+ "b": {
112
+ "name": "Custom",
113
+ "buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/App.entitlements"},
114
+ },
115
+ }
116
+ self.assertEqual(
117
+ _entitlements_from_configs(
118
+ objects, ["a", "b"], target_name="App", base=Path("/nonexistent")),
119
+ "App/App.entitlements",
120
+ )
121
+
122
+ def test_release_wins_over_debug_regardless_of_order(self):
123
+ objects = self._objects()
124
+ objects["rel"]["buildSettings"]["CODE_SIGN_ENTITLEMENTS"] = (
125
+ "App/Release.entitlements")
126
+ for order in (["dbg", "rel", "prof"], ["rel", "dbg", "prof"]):
127
+ self.assertEqual(
128
+ _entitlements_from_configs(
129
+ objects, order, target_name="App", base=Path("/nonexistent")),
130
+ "App/Release.entitlements",
131
+ )
132
+
133
+ def test_profile_is_the_archive_config_when_release_does_not_exist(self):
134
+ objects = {
135
+ "dbg": {
136
+ "name": "Debug",
137
+ "buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Debug.entitlements"},
138
+ },
139
+ "prof": {
140
+ "name": "Profile",
141
+ "buildSettings": {"CODE_SIGN_ENTITLEMENTS": "App/Profile.entitlements"},
142
+ },
143
+ }
144
+ self.assertEqual(
145
+ _entitlements_from_configs(
146
+ objects, ["dbg", "prof"], target_name="App",
147
+ base=Path("/nonexistent")),
148
+ "App/Profile.entitlements",
149
+ )
150
+
151
+
79
152
  if __name__ == "__main__":
80
153
  unittest.main()
@@ -1 +1 @@
1
- 1.0.24
1
+ 1.0.26
@@ -1 +1 @@
1
- 1.0.24
1
+ 1.0.26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gowalk-cicd",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Zero-config GitHub Actions delivery for iOS TestFlight and Android Google Play.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -287,7 +287,20 @@ jobs:
287
287
  # release. Empty when the directory is absent — the action skips it.
288
288
  whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}
289
289
 
290
- - name: Retry Google Play upload
290
+ # The retry serves two different failures, and both need a fresh edit:
291
+ # * the edit expired mid-upload (a large bundle on a slow runner), and
292
+ # * Play refused to auto-submit: "Changes cannot be sent for review
293
+ # automatically. Please set changesNotSentForReview to true." Play returns
294
+ # this once an app has changes a human must submit — after a policy
295
+ # rejection, for instance — and it fails the whole upload, so the built
296
+ # bundle never lands at all.
297
+ # Retrying with changesNotSentForReview gets the bundle onto Play either way.
298
+ # In the ordinary case the first attempt already submitted it and this is
299
+ # skipped; in the refused case the bundle is uploaded and waits for someone to
300
+ # press "Send changes for review" in Play Console, which is the only thing
301
+ # Google will not let a tool do.
302
+ - name: Retry Google Play upload without auto-submit
303
+ id: play-upload-retry
291
304
  if: ${{ steps.mode.outputs.mode == 'local' && steps.play.outputs.ready == 'true' && steps.play-upload.outcome == 'failure' }}
292
305
  uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
293
306
  with:
@@ -298,3 +311,13 @@ jobs:
298
311
  status: ${{ vars.GOOGLE_PLAY_STATUS || 'completed' }}
299
312
  userFraction: ${{ vars.GOOGLE_PLAY_STATUS == 'inProgress' && (vars.GOOGLE_PLAY_USER_FRACTION || '0.2') || '' }}
300
313
  whatsNewDirectory: ${{ hashFiles('distribution/whatsnew/**') != '' && 'distribution/whatsnew' || '' }}
314
+ changesNotSentForReview: true
315
+
316
+ - name: Say what still needs a human
317
+ if: ${{ always() && steps.play-upload-retry.outcome == 'success' }}
318
+ shell: bash
319
+ run: |
320
+ echo "::warning::Play would not accept this release for review automatically, so it was \
321
+ uploaded without being submitted. Open Play Console for \
322
+ ${{ steps.android.outputs.package-name }} and press 'Send changes for review' on the \
323
+ Publishing overview page. This is normal after a policy rejection."