Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ jobs:
with:
path: binaries

# Each artifact is downloaded into binaries/<artifact-name>/<asset>, so */*
# covers every binary, .deb and .rpm. The sed strips the directory prefix so
# each line is "<sha256> <asset name>", 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:
Expand All @@ -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]
Expand Down
30 changes: 26 additions & 4 deletions docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Note>
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).
</Note>

```bash
Expand Down Expand Up @@ -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).

<Note>
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).
</Note>

<Tabs>
<Tab title="Linux AMD64">
```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
Comment thread
tianzhou marked this conversation as resolved.
Comment thread
tianzhou marked this conversation as resolved.

# Make it executable
chmod +x pgschema
Expand All @@ -155,7 +155,7 @@ Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgs
<Tab title="Linux ARM64">
```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
Expand All @@ -169,6 +169,28 @@ Replace `v1.0.0` with the [latest release version](https://github.com/pgplex/pgs
</Tab>
</Tabs>

## Verify Downloads

Each release includes a `pgschema-<version>-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.

<Note>
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.
</Note>

```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:
Expand Down
Loading