Publish a checksums file with each release
Thanks for pgschema, and for the fix in #398, which we just upgraded for.
Request: publish a checksums file (for example pgschema-<version>-checksums.txt, in sha256sum format) as an asset of each release.
Why: version managers verify a download against a checksums file fetched from the release, and without one they install pgschema unverified. We tried proto: its plugin format takes a checksum-url in sha256sum format, as golangci-lint publishes, but has nothing to point at for pgschema. GitHub does show a sha256: digest per asset now, but only in the release API JSON, which these tools cannot read. For now we install with go install, which sum.golang.org verifies, but a checksums file would let tools use your prebuilt binaries safely.
Suggested change to release.yml, in the release job after "Download artifacts":
- name: Generate checksums
working-directory: binaries
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
sha256sum pgschema-"$VERSION"-*/pgschema-"$VERSION"-* pgschema-deb-*/*.deb pgschema-rpm-*/*.rpm \
| sed -E 's# .*/# #' > "pgschema-$VERSION-checksums.txt"
and add binaries/pgschema-${{ steps.version.outputs.version }}-checksums.txt to the files: list of "Create release". Against a copy of the binaries/ layout this workflow downloads, the step writes one <hash> <asset name> line per binary, .deb and .rpm, and checking it with shasum -a 256 -c (the macOS equivalent of sha256sum -c) passes from a directory holding the release assets.
Happy to open a PR if that helps.