ci: sign SHA256SUMS with minisign #65

Merged
jcoffey-dev merged 1 commits from feat/signed-releases into main 2026-11-12 13:42:40 +00:00
2 changed files with 32 additions and 1 deletions

No files matched your search

+23 -1
View File
@@ -171,6 +171,24 @@ jobs:
- run: |
(cd dist && sha256sum ./*.tar.gz | sed 's| \./| |' > SHA256SUMS)
cat dist/SHA256SUMS
# Sign SHA256SUMS with the suite's minisign key, so a download can be
# verified offline against the public key in the README. Unset secret
# (as on a fork, or before the key is added) leaves the release unsigned.
- name: Sign SHA256SUMS with minisign
env:
MINISIGN_SECRET_KEY: ${{ secrets.MINISIGN_SECRET_KEY }}
run: |
set -euo pipefail
if [ -z "${MINISIGN_SECRET_KEY:-}" ]; then
echo "::warning::MINISIGN_SECRET_KEY is not set; this release will be unsigned"
exit 0
fi
sudo apt-get -qq update >/dev/null && sudo apt-get -qq install -y --no-install-recommends minisign >/dev/null
umask 077
key="$(mktemp)"; printf '%s\n' "$MINISIGN_SECRET_KEY" > "$key"
minisign -S -s "$key" -m dist/SHA256SUMS -t "inbuxa $TAG"
rm -f "$key"
echo "signed dist/SHA256SUMS -> dist/SHA256SUMS.minisig"
- env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
@@ -181,7 +199,11 @@ jobs:
for f in inbuxa-migrate-linux-amd64.tar.gz inbuxa-migrate-linux-arm64.tar.gz SHA256SUMS; do
[ -s "dist/$f" ] || { echo "::error::dist/$f is missing; not creating a release"; exit 1; }
done
files="Binaries for linux/amd64 and linux/arm64. Verify with SHA256SUMS."
if [ -e dist/SHA256SUMS.minisig ]; then
files="Binaries for linux/amd64 and linux/arm64. Verify with SHA256SUMS (signed as SHA256SUMS.minisig; minisign public key in the README)."
else
files="Binaries for linux/amd64 and linux/arm64. Verify with SHA256SUMS."
fi
notes="$(awk -v v="${TAG#v}" 'index($0, "## [" v "]") == 1 {f = 1; next}
f && (/^## / || /^---$/) {exit}
f' CHANGELOG.md | sed -e '/./,$!d')"
+9
View File
@@ -107,6 +107,15 @@ and a `SHA256SUMS` file:
On arm64, fetch `inbuxa-migrate-linux-arm64.tar.gz` instead. The binary is
the whole program; put it anywhere on the path.
`SHA256SUMS` is signed with [minisign](https://jedisct1.github.io/minisign/),
so you can confirm it came from us before trusting the checksums.
`SHA256SUMS.minisig` is the signature:
curl -fLO "$base/SHA256SUMS.minisig"
minisign -Vm SHA256SUMS -P RWS1yFYwVuJ7MGJTZXLbhv9+hrEsjrC8Zg+7WmPlM86Sjy0qF/xkoCKq
The same public key signs every inbuxa release (installer, migrate and cli).
## Building and testing
cargo build --release the binary is target/release/inbuxa-migrate