release.yml/pages.yml: fix release-asset race with a needs:-gated deploy - #20
Merged
Merged
Conversation
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
marked this pull request as ready for review
September 4, 2026 17:10
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both the
v1.0.5andv1.0.6releases hit the same "Deploy web flasher" (pages.yml) failure:Root cause: publishing a release fires the
release: releasedevent immediately, butrelease.yml's own job — which builds the firmware and uploads that tag's four binaries — can still be running for another ~2 minutes. Whicheverpages.ymlrun lands first triesgh 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 stalev1.0.5binaries even afterv1.0.6was 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.ymlnow gets adispatch-deployjob gated withneeds: release. That guarantees, by construction, that the re-dispatch ofpages.ymlonly happens after the asset-upload step has completed — there's no window where the dispatched run can find the assets missing. This mirrors thebuild → assemble → deployjob-dependency pattern used byd3mocide/OpenMANET-XIAO-Gateway'sbuild-firmware.yml, adapted to keep this repo's separate versioned-Release-as-distribution-artifact model (Launcher/SD-drop.bindownloads, 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 viewregardless of whendispatch-deployruns, 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.ymlonmainoncev1.0.6's assets existed — that redeploy succeeded and the live web flasher is now servingv1.0.6.Test plan
Deploy web flasher(workflow_dispatch) to confirm assets exist and a fresh run succeeds — run 15, conclusion: successBuildpasses on this PR (release.yml's new job only runs on a tag push/dispatch, so it isn't exercised by PR CI)dispatch-deploy🤖 Generated with Claude Code
https://claude.ai/code/session_01FHBCMHmvCZtH45K9CX8mF6