dist attaches to the release rather than creating it - #24
Merged
Merged
Conversation
The generated release.yml ended its host job with `gh release create` against the tag ship has already released, and that one line is what attached every platform archive, the installer, the formula and the Windows zip the winget entry names. GitHub refuses a second release on a tag that already has one, so the job goes red, nothing it carries reaches the release, and publish-homebrew-formula, which needs host, is skipped with it. `create-release = false` says the release belongs to somebody else. `dist generate` then writes `gh release upload` followed by `gh release edit --draft=false` in place of the create. Both the configuration line and the generated step are what ship-test-rust, the repo that exercises this against real releases, already carries. deb.yml's header described cargo-dist creating the release with the default GITHUB_TOKEN, for which GitHub fires no release event. ship creates it with a person's token, so the event fires and deb.yml starts itself; the hand dispatch stays for a release created any other way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BDPzwzMCSL2rhkrmGCAtP
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.
What was wrong
The generated
release.ymlended itshostjob withgh release createagainst the tag ship has already released. GitHub allows one release per tag, so that step could only fail, and it is the only thing that attaches every platform archive, the installer, the formula and the Windows zip the winget entry names.publish-homebrew-formuladeclaresneeds: [plan, host], so a red host skips it and the tap never moves.What the fix is
create-release = falseindist-workspace.toml, and.github/workflows/release.ymlregenerated withdist generate. The host job now runsgh release uploadon the tag, followed bygh release edit --target <sha> --draft=false, which is a no-op against a release ship has already published.deb.yml's header described cargo-dist creating the release with the defaultGITHUB_TOKEN, for which GitHub fires no release event, and said deb.yml therefore had to be dispatched by hand after one. ship creates the release with a person's token, so the event fires and deb.yml starts itself. The hand dispatch stays for a release created any other way, and for the dry run.Verified against
ship-test-rust, the repo that exercises this step against real releases. Itsdist-workspace.tomlcarries the samecreate-release = falseline under the same comment, and its generatedCreate GitHub Releasestep is line for line the one this branch now has. Both repos pincargo-dist-version = "0.31.0", and the workflow here was regenerated with that same dist 0.31.0, so the only change to the file is the header note and the host step. The rest of the release path was read rather than assumed:publish-crate.ymlruns on the tag push and is untouched, anddeb.ymlruns onrelease: published, which is the event ship'sgh release createfires.The same change is on xray's
release-configbranch; anderix/ship#55 names both repos and is answered by the pair.Closes anderix/ship#55
🤖 Generated with Claude Code
https://claude.ai/code/session_014BDPzwzMCSL2rhkrmGCAtP