From 6c485cf3ebdbbcd2fe18da3084aaa2c95f1709b7 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 2 Nov 2026 02:47:15 -0500 Subject: [PATCH] Keep the checksum file out of its own list The FreeBSD draft step redirected into SHA256SUMS.txt before the glob expanded, so the file listed itself with the hash of an empty file and sha256sum -c failed on it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8395449..1da3725 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -315,6 +315,8 @@ jobs: [ "$(gh release view "$tag" --json isDraft --jq .isDraft)" = true ] gh release download "$tag" --pattern SHA256SUMS.txt --dir "$RUNNER_TEMP" # The shared draft job also picks up any archive that finished before it ran. - { grep -v -- '-freebsd-' "$RUNNER_TEMP/SHA256SUMS.txt" || true; sha256sum -- *; } | sort -k2 >SHA256SUMS.txt + # Written outside this directory, or the * below would list the checksum file itself. + { grep -v -- '-freebsd-' "$RUNNER_TEMP/SHA256SUMS.txt" || true; sha256sum -- *; } | sort -k2 >"$RUNNER_TEMP/SHA256SUMS.new" + mv "$RUNNER_TEMP/SHA256SUMS.new" SHA256SUMS.txt gh release upload "$tag" --clobber -- * cat SHA256SUMS.txt