Skip to content

fix: a release names its files the way GitHub will leave them - #13

Merged
FrancescBagur merged 1 commit into
masterfrom
fix/release-file-names
Nov 12, 2026
Merged

FrancescBagur merged 1 commit into
masterfrom
fix/release-file-names

Conversation

@FrancescBagur

@FrancescBagur FrancescBagur commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

What this changes

A release's .deb leaves the workflow under a name GitHub will not change, and the publish job refuses to go on if any file has a name it might.

v0.1.0-beta.1 was published with SHA256SUMS naming gitrust_0.1.0~beta.1_amd64.deb and the file itself called gitrust_0.1.0.beta.1_amd64.deb: GitHub does not keep a tilde in the name of a release file and replaces it without saying so. sha256sum -c SHA256SUMS failed on the .deb, which was the right file all along. The SHA256SUMS on that release has been replaced by hand with one that names the file as it is served; the four hashes are the same four.

What was decided

  • The file is gitrust_0.1.0-beta.1_amd64.deb; the version inside it is still 0.1.0~beta.1. The tilde is there for dpkg, and dpkg reads the version from the package, not from what the file is called. So the name follows the tag and the other three files, and deb.sh is left alone: run by hand it still names the file the way Debian does.
  • The rename is in the Linux job, not in the publish job. A run by hand skips publishing, and a fix that only a tag can exercise is how this got out in the first place.
  • The publish job checks every name before it writes the checksums. Letters, digits, dot, hyphen and underscore, not starting with a dot -- narrower than what GitHub actually accepts, on purpose, because what it accepts is not written down anywhere I would rely on. A name outside that stops the run with nothing published.
  • Not done: creating the release as a draft, comparing what GitHub called the files with what was built, and only then publishing. It would catch a renaming rule nobody has thought of. It is also three more commands that can only ever run on a real tag.

Checked

  • cargo test passes here, not just in CI -- nothing that compiles was touched; 382 at this code
  • It was run, as far as it can be without a tag: both new fragments were run locally -- the rename with a beta version and with a plain one, the check against the four real names (passes), against the tilde name and a name with a space (both stop).
  • A run by hand from this branch built all three systems, and its linux artifact holds gitrust_0.1.0-beta.1_amd64.deb with Version: 0.1.0~beta.1 inside.
  • The check in the publish job has not run on GitHub, and cannot without pushing a tag. It has only run here, as a fragment.
  • Anything that writes (index, stash, branches, remote) or touches the graph layout carries a test -- none of that is touched
  • Commits are signed off (git commit -s) and read as sentences

🤖 Generated with Claude Code

The first beta went out with a .deb called gitrust_0.1.0~beta.1 and
GitHub published it as gitrust_0.1.0.beta.1: it does not keep a tilde in
the name of a release file, and does not say so. SHA256SUMS had been
written before that and went on naming the file by the name it no longer
had, so checking the download against it failed on the .deb -- which was
the right file all along.

The .deb now leaves the Linux job named after the version as Cargo
writes it, hyphen and all. The version inside the package keeps its
tilde, and that is the one dpkg reads.

And the publish job stops, before anything is published, on any file
whose name GitHub might change, so the next character it objects to is
found by a red run and not by somebody checking a download.

Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
Co-Authored-By: Claude <noreply@anthropic.com>
@FrancescBagur
FrancescBagur merged commit 0b969c5 into master Nov 12, 2026
7 checks passed
@FrancescBagur
FrancescBagur deleted the fix/release-file-names branch November 12, 2026 08:35
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