ci: make the binaries re-runnable, and give Windows a bash - #62
Merged
Conversation
The 0.6.2 release shipped Linux and macOS archives and no zip. The build step had no shell: bash, and Windows runners default to PowerShell, where "$TARGET" expands to the empty string -- so cargo build --target was handed nothing. Every step is bash now, which is what the Package step already did and the Build step should have. The larger fix is the split. Publishing to crates.io happens once and cannot be repeated, so a failed artifact build inside release.yml leaves no way back except cutting another version. binaries.yml runs on a published release and on demand for any tag, so a leg that fails for a runner-image reason is re-run rather than re-released. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
zizmor audits at pedantic level and wants one. Keyed on the tag so two dispatches for the same release cannot race uploading the same asset names, and never cancelled in flight: a run interrupted between building and uploading leaves the release short an archive, which is the failure this workflow exists to make recoverable. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
zizmor flags the toolchain action as superfluous, and it is right: the runners already ship stable Rust, so the only thing needed is the cross-target std. One fewer third-party action in the job that produces downloadable binaries is worth having on its own. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
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.
The v0.6.2 release shipped Linux and macOS archives and no
.zip.The bug
The Build step had no
shell: bash. Windows runners default to PowerShell, where"$TARGET"expands to the empty string — socargo build --release --locked --targetwas handed nothing and exited 1. The Package step already hadshell: bash; the Build step should have too.The larger fix
Publishing to crates.io happens once and cannot be repeated. With the artifact build inside
release.yml, a leg that fails for a reason unrelated to the release — a runner image change, a transient network — leaves no way back except cutting another version. That is the wrong incentive.binaries.ymlruns onrelease: publishedand onworkflow_dispatchfor any tag, so a failed leg is re-run, not re-released. It checks out the tag rather than the branch, since an artifact must be built from the commit the release names whatever main has moved on to.What already worked
Four of five targets built and uploaded, including both arm64 runners —
ubuntu-24.04-armand Apple silicon — so the native-build matrix is sound.The documented download flow is verified against the real release:
latest/downloadresolving proves the unversioned alias does its job. No Rust anywhere in that sequence.Once merged I will dispatch it for
v0.6.2to fill in the missing Windows archive.