Skip to content

ci: make the binaries re-runnable, and give Windows a bash - #62

Merged
vyncint merged 3 commits into
mainfrom
binaries-workflow
Aug 23, 2026
Merged

ci: make the binaries re-runnable, and give Windows a bash#62
vyncint merged 3 commits into
mainfrom
binaries-workflow

Conversation

@vyncint

@vyncint vyncint commented Aug 23, 2026

Copy link
Copy Markdown
Owner

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 — so cargo build --release --locked --target was handed nothing and exited 1. The Package step already had shell: 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.yml runs on release: published and on workflow_dispatch for 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 runnersubuntu-24.04-arm and Apple silicon — so the native-build matrix is sound.

The documented download flow is verified against the real release:

$ curl -fsSLO .../releases/latest/download/mossaic-x86_64-unknown-linux-musl.tar.gz
$ sha256sum -c mossaic-x86_64-unknown-linux-musl.tar.gz.sha256
mossaic-x86_64-unknown-linux-musl.tar.gz: OK
$ ./mossaic-*/mossaic-art --version
mossaic-art 0.6.2

latest/download resolving proves the unversioned alias does its job. No Rust anywhere in that sequence.

Once merged I will dispatch it for v0.6.2 to fill in the missing Windows archive.

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>
@vyncint
vyncint merged commit 90c2f79 into main Aug 23, 2026
11 checks passed
@vyncint
vyncint deleted the binaries-workflow branch August 23, 2026 06:48
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