Fix the release workflow so a dispatch actually produces assets - #47
Open
philipbjorge wants to merge 3 commits into
Open
Fix the release workflow so a dispatch actually produces assets#47philipbjorge wants to merge 3 commits into
philipbjorge wants to merge 3 commits into
Conversation
added 3 commits
August 18, 2026 13:35
The build matrix runs with the default fail-fast, so the first leg that fails cancels every other leg. In the v0.3.26 release run, the Windows and x86_64 Linux legs failed before executing a single step, the three remaining legs were cancelled, `upload` was skipped through `needs`, and the release published with no assets at all. Set fail-fast: false so an unavailable runner costs one target instead of all five, and let `upload` run whenever the matrix is not cancelled so a partial asset set still reaches the release. Guard the upload with an explicit check that at least one artifact arrived, so a fully failed matrix fails loudly here rather than silently publishing nothing.
The workflow takes no input, so every job builds whatever ref the dispatch happened to use and `softprops/action-gh-release` falls back to github.ref for the target release. Dispatching from a branch therefore builds the branch and attaches assets to a ref that is not a release tag, and the crates.io publish step packages the branch rather than the tagged source. Add a required `tag` input, check it out in both the build matrix and the publish job, and pass it to the release action explicitly.
The Windows and Linux legs request Blacksmith runners. In the v0.3.26 run neither could be acquired and both jobs failed without executing a step, which is what took the release down. PR Check uses the same Linux label successfully, so the label is live; the release matrix asks for three Blacksmith runners at once and does not get them. Move the five release targets to GitHub-hosted runners. This repository is public, so those minutes are free, and a dispatch-only release that runs a few times a month then draws nothing from the shared Blacksmith pool. That serves ADR 0001's goal — protect the shared pool — more completely than routing release builds through it. PR Check stays on Blacksmith, unchanged.
Author
|
The red PR Check here is the pre-existing #46 includes the one-line fix, so this goes green once that lands (or if you would rather have it here instead, say the word and I will move it). |
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.
Addresses #43. Every Release run since v0.3.7 has failed, which is why v0.3.26 shipped with no assets and v0.3.27 is Windows-only. There are three independent causes; each is its own commit so you can take them separately.
1. One failed leg cancels the rest
The v0.3.26 run:
Zero steps on the failed jobs means they never acquired a runner. Default
fail-fastthen cancelled the three healthy legs, andneeds: buildskipped the upload — so a runner-availability problem on two targets became a release with nothing attached.fail-fast: falsemakes an unavailable runner cost one target instead of five.uploadnow runs on!cancelled()so a partial asset set still reaches the release, with an explicit guard that fails loudly if nothing built rather than silently publishing an empty release.2. The dispatched tag is never actually used
workflow_dispatchtakes no inputs, so:softprops/action-gh-releasefalls back togithub.reffor the target release, which is a branch ref whenever the workflow is dispatched from a branch rather than a tag;publishjob checks out that same ref, socargo publishcan package the branch instead of the tagged source.This adds a required
taginput, checks it out in both the build matrix and the publish job, and passes it to the release action explicitly.3. The release matrix cannot get Blacksmith runners
The Windows and Linux legs request Blacksmith runners and failed without executing a step. The label is live — PR Check uses
blacksmith-4vcpu-ubuntu-2404successfully — but the release matrix requests three Blacksmith runners simultaneously and does not get them.This moves the five release targets to GitHub-hosted runners. I want to be careful here because ADR 0001 is explicit about protecting the shared Blacksmith pool: this repository is public, so GitHub-hosted minutes are free, and a dispatch-only release that runs a few times a month then draws nothing from the shared pool. That serves the ADR's stated goal more completely than routing release builds through it. PR Check stays on Blacksmith, untouched.
If you would rather keep the release on Blacksmith, commits 1 and 2 stand on their own and are worth taking regardless — commit 1 alone would have given v0.3.26 its macOS assets.
Verification
actionlintpasses clean on the result. I have not been able to execute the workflow against your runners, so the runner change in commit 3 is the one piece verified by reasoning rather than by a run.