Files
HaloKeymind/.github
agessaman 9fc90ee099 ci(beta): retry GitHub API calls in the publish step
Run 29708863985 had every build shard green and then died here:

  HTTP 503 ... (https://api.github.com/repos/agessaman/MeshCore/releases)
  Error: Process completed with exit code 1

'gh release create' hit a transient 503 during a GitHub incident and, under
'bash -e', threw away ~15 minutes of building across 14 runners. Nothing was
wrong with the code.

Add a gh_retry helper (5 attempts, exponential backoff 10/20/40/80s) around the
create and upload calls. 'until' in a condition does not trip -e, so the helper
is safe in this shell.

Deliberate choices:
- The existence check is NOT retried: 'release does not exist' is the expected
  answer on a first run and retrying would only burn backoff. A 5xx there falls
  through to create, which now tolerates an already-existing release.
- Prune failures no longer fail the job. Pruning is housekeeping that runs AFTER
  a successful upload; leaving stale assets until the next run beats reporting
  failure for a build whose binaries are already published.
- The prune's second 'gh release view' is gone — it reuses the asset list already
  fetched, removing an API call as well as an unretried failure point.

Retry helper unit-tested for the success, transient-recovery, and
exhaustion paths.

Production (build-observer-firmwares.yml) has the identical fragility and should
get the same treatment; not changed here to keep this scoped to the beta channel.
2026-07-19 17:23:10 -07:00
..
2026-04-26 00:24:40 +12:00