ci: verify goreleaser split checksums by recompute-and-compare#4
Merged
Conversation
…T-77] goreleaser's checksum.split writes one file per artifact containing just the bare sha256 hash (no filename), which `shasum -c` cannot parse, so the publish job failed at 'Verify checksums' on the v0.0.1-test4 run. Recompute each tarball's hash and compare it to its .sha256 file instead, and add a guard test. Verified against the real test4 artifacts.
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.
Problem
On the
v0.0.1-test4release run, every build succeeded (including signed + notarized macOS binaries), but the publish job failed at Verify checksums:goreleaser's
checksum.split: truewrites one file per artifact whose entire content is the bare sha256 hash (64 hex chars, no filename, no newline):shasum -cexpectsHASH␠␠FILENAMElines and rejects the bare-hash format, so verification always failed.Change
release.yml: the Verify checksums step now recomputes each tarball's sha256 and compares it to the value in its.sha256file, instead ofshasum -c. It still fails closed on a missing artifact or any mismatch.release_test.go:TestChecksumVerifyHandlesSplitFormatguards against reintroducingshasum -c.The Homebrew formula render is unaffected:
render-formula.shcomputes hashes directly from the tarballs, not from these files.Testing
v0.0.1-test5tag after merge.