Skip to content

ci: verify goreleaser split checksums by recompute-and-compare#4

Merged
dougmartin merged 1 commit into
mainfrom
REPORT-77-release-checksum-verify
Jul 22, 2026
Merged

ci: verify goreleaser split checksums by recompute-and-compare#4
dougmartin merged 1 commit into
mainfrom
REPORT-77-release-checksum-verify

Conversation

@dougmartin

Copy link
Copy Markdown
Member

Problem

On the v0.0.1-test4 release run, every build succeeded (including signed + notarized macOS binaries), but the publish job failed at Verify checksums:

shasum: cc-data_0.0.1-test4_darwin_amd64.tar.gz.sha256: no properly formatted SHA checksum lines found

goreleaser's checksum.split: true writes one file per artifact whose entire content is the bare sha256 hash (64 hex chars, no filename, no newline):

74d2cd62f6730d8972f1786edd912eba0587d340cb237c48d867ada56b60c595

shasum -c expects HASH␠␠FILENAME lines 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 .sha256 file, instead of shasum -c. It still fails closed on a missing artifact or any mismatch.
  • release_test.go: TestChecksumVerifyHandlesSplitFormat guards against reintroducing shasum -c.

The Homebrew formula render is unaffected: render-formula.sh computes hashes directly from the tarballs, not from these files.

Testing

  • YAML validates; guard tests pass.
  • Ran the new verify loop against the three real artifacts downloaded from the failed test4 run: all three match (exit 0).
  • Will confirm a fully green publish (GitHub release + formula push) with a fresh v0.0.1-test5 tag after merge.

…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.
@dougmartin
dougmartin merged commit d415931 into main Jul 22, 2026
10 checks passed
@dougmartin
dougmartin deleted the REPORT-77-release-checksum-verify branch July 22, 2026 16:03
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