diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48b80bd1..7e16bc5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,6 +176,15 @@ jobs: with: path: binaries + # Each artifact is downloaded into binaries//, so */* + # covers every binary, .deb and .rpm. The sed strips the directory prefix so + # each line is " ", the format `sha256sum -c` expects. + - name: Generate checksums + working-directory: binaries + run: | + sha256sum */* | sed -E 's# .*/# #' > "pgschema-${{ steps.version.outputs.version }}-checksums.txt" + cat "pgschema-${{ steps.version.outputs.version }}-checksums.txt" + - name: Create release uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: @@ -192,6 +201,7 @@ jobs: binaries/pgschema-deb-arm64/*.deb binaries/pgschema-rpm-amd64/*.rpm binaries/pgschema-rpm-arm64/*.rpm + binaries/pgschema-${{ steps.version.outputs.version }}-checksums.txt docker: needs: [build-binaries, packages] diff --git a/docs/installation.mdx b/docs/installation.mdx index 20d6ad61..3c001eff 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -36,7 +36,7 @@ Windows is not supported. Please use WSL (Windows Subsystem for Linux) or a Linu Download and install the pre-built binary for macOS. - Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgschema/releases). + Replace `v1.0.0` and `1.0.0` with the [latest release version](https://github.com/pgplex/pgschema/releases). ```bash @@ -132,14 +132,14 @@ Replace `v1.0.0` and `1.0.0` with the [latest release version](https://github.co For Linux systems without package manager support, download pre-built binaries from the [GitHub releases page](https://github.com/pgplex/pgschema/releases). -Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgschema/releases). +Replace `v1.0.0` and `1.0.0` with the [latest release version](https://github.com/pgplex/pgschema/releases). ```bash # Download the binary - curl -L https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-linux-amd64 -o pgschema + curl -L https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-1.0.0-linux-amd64 -o pgschema # Make it executable chmod +x pgschema @@ -155,7 +155,7 @@ Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgs ```bash # Download the binary - curl -L https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-linux-arm64 -o pgschema + curl -L https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-1.0.0-linux-arm64 -o pgschema # Make it executable chmod +x pgschema @@ -169,6 +169,28 @@ Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgs +## Verify Downloads + +Each release includes a `pgschema--checksums.txt` file with the SHA-256 checksum of every binary, DEB, and RPM asset. Download it next to the asset and verify before installing. + + +Replace `v1.0.0` and `1.0.0` with the [latest release version](https://github.com/pgplex/pgschema/releases). Keep the original asset file name when downloading so it matches the checksums file. + + +```bash +# Download an asset and the checksums file +curl -LO https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-1.0.0-linux-amd64 +curl -LO https://github.com/pgplex/pgschema/releases/download/v1.0.0/pgschema-1.0.0-checksums.txt + +# Verify on Linux +sha256sum -c --ignore-missing pgschema-1.0.0-checksums.txt + +# Verify on macOS +shasum -a 256 -c --ignore-missing pgschema-1.0.0-checksums.txt +``` + +`--ignore-missing` skips assets you did not download. A successful check prints `OK` for each downloaded asset; a mismatch prints `FAILED` and exits non-zero. + ## Docker Run pgschema using Docker without installing it locally: