Skip to content

dist attaches to the release rather than creating it - #24

Merged
anderix merged 1 commit into
mainfrom
release-config
Sep 17, 2026
Merged

anderix merged 1 commit into
mainfrom
release-config

Conversation

@anderix

@anderix anderix commented Sep 17, 2026

Copy link
Copy Markdown
Member

What was wrong

The generated release.yml ended its host job with gh release create against 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-formula declares needs: [plan, host], so a red host skips it and the tap never moves.

What the fix is

create-release = false in dist-workspace.toml, and .github/workflows/release.yml regenerated with dist generate. The host job now runs gh release upload on the tag, followed by gh 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 default GITHUB_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. Its dist-workspace.toml carries the same create-release = false line under the same comment, and its generated Create GitHub Release step is line for line the one this branch now has. Both repos pin cargo-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.yml runs on the tag push and is untouched, and deb.yml runs on release: published, which is the event ship's gh release create fires.

The same change is on xray's release-config branch; 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

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
@anderix
anderix merged commit 88c9e3d into main Sep 17, 2026
7 checks 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.

1 participant