Skip to content

release.yml/pages.yml: fix release-asset race with a needs:-gated deploy - #20

Merged
d3mocide merged 2 commits into
mainfrom
claude/github-actions-issues-xzak8h
Sep 4, 2026
Merged

d3mocide merged 2 commits into
mainfrom
claude/github-actions-issues-xzak8h

Conversation

@d3mocide

@d3mocide d3mocide commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Both the v1.0.5 and v1.0.6 releases hit the same "Deploy web flasher" (pages.yml) failure:

gh release download "v1.0.6" -R "$GITHUB_REPOSITORY" -D stable-assets --clobber
no assets to download
##[error]Process completed with exit code 1.

Root cause: publishing a release fires the release: released event immediately, but release.yml's own job — which builds the firmware and uploads that tag's four binaries — can still be running for another ~2 minutes. Whichever pages.yml run lands first tries gh release download <tag> before the assets exist and fails. This happened identically for both of the last two tagged releases, and left the live Pages site stuck serving stale v1.0.5 binaries even after v1.0.6 was fully built and published.

Fix (this revision): rather than reacting to another cross-workflow event (which just relocates the same race — an earlier commit on this branch tried adding workflow_run: ["Release"], which is still a race, just a narrower one), release.yml now gets a dispatch-deploy job gated with needs: release. That guarantees, by construction, that the re-dispatch of pages.yml only happens after the asset-upload step has completed — there's no window where the dispatched run can find the assets missing. This mirrors the build → assemble → deploy job-dependency pattern used by d3mocide/OpenMANET-XIAO-Gateway's build-firmware.yml, adapted to keep this repo's separate versioned-Release-as-distribution-artifact model (Launcher/SD-drop .bin downloads, the version.h↔tag check, the release-notes-exist gate) rather than replacing it outright.

A draft release (the normal tag-push flow) stays invisible to pages.yml's gh release view regardless of when dispatch-deploy runs, so this doesn't expose anything before a maintainer actually publishes it — same guarantee as before, just race-free instead of racy.

Also done in this session (no code change, recovery only): manually re-dispatched pages.yml on main once v1.0.6's assets existed — that redeploy succeeded and the live web flasher is now serving v1.0.6.

Test plan

  • Validated both modified workflow files are well-formed YAML
  • Manually re-ran Deploy web flasher (workflow_dispatch) to confirm assets exist and a fresh run succeeds — run 15, conclusion: success
  • Build passes on this PR (release.yml's new job only runs on a tag push/dispatch, so it isn't exercised by PR CI)
  • The next tagged release is the real end-to-end test of dispatch-deploy

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHBCMHmvCZtH45K9CX8mF6

v1.0.5 and v1.0.6 both hit the same failure: publishing a release fires
`release: released` (and Build's workflow_run) before release.yml's own
job finishes uploading that tag's binaries, so the deploy job's `gh
release download <tag>` finds no assets and fails. Re-entering once
Release completes is race-free: gh release view still skips a release
left in draft, so this doesn't expose anything before it's published.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHBCMHmvCZtH45K9CX8mF6
Replaces the reactive workflow_run(Release) trigger added earlier this
session with a needs:-gated dispatch-deploy job in release.yml itself,
following the build->assemble->deploy dependency pattern used by
OpenMANET-XIAO-Gateway's build-firmware.yml. needs: orders this after
the asset-upload step by construction, so there's no window where the
dispatched pages.yml run can find the tag's assets missing -- unlike an
event reacting to workflow completion, which raced that same upload in
both v1.0.5 and v1.0.6.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHBCMHmvCZtH45K9CX8mF6
@d3mocide d3mocide changed the title pages.yml: fix release-asset race that broke v1.0.5/v1.0.6 deploys release.yml/pages.yml: fix release-asset race with a needs:-gated deploy Sep 4, 2026
@d3mocide
d3mocide marked this pull request as ready for review September 4, 2026 17:10
@d3mocide
d3mocide merged commit d7b7b25 into main Sep 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants