diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0d2ee16..5f38ce0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -51,6 +51,21 @@ jobs: || { echo "$TAG is a lightweight tag; its annotation is the release notes" >&2; exit 1; } - run: go test -count=1 ./... - run: scripts/build-release.sh "$TAG" dist + - name: Sign SHA256SUMS with minisign + env: + MINISIGN_SECRET_KEY: ${{ secrets.MINISIGN_SECRET_KEY }} + run: | + set -euo pipefail + if [ -z "${MINISIGN_SECRET_KEY:-}" ]; then + echo "MINISIGN_SECRET_KEY is not set; this release will be unsigned" >&2 + exit 0 + fi + apt-get -qq update >/dev/null && 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" - name: Release on Gitea run: | set -euo pipefail @@ -58,7 +73,7 @@ jobs: API="$CI_SERVER_INTERNAL/api/v1/repos/$GITHUB_REPOSITORY" auth=(-H "Authorization: token $TOKEN") notes="$(git for-each-ref "refs/tags/$TAG" --format='%(contents)' | sed -e '/^-----BEGIN [A-Z ]*SIGNATURE-----$/,$d')" # PGP or SSH - notes="$notes"$'\n\n'"Static binaries for linux/amd64 and linux/arm64. Verify with SHA256SUMS." + notes="$notes"$'\n\n'"Static binaries for linux/amd64 and linux/arm64. Verify with SHA256SUMS (signed as SHA256SUMS.minisig; minisign public key in the README)." pre=false; [[ "$TAG" == *-rc.* ]] && pre=true created=0 id="$(curl -fsS "${auth[@]}" "$API/releases/tags/$TAG" 2>/dev/null | jq -r '.id // empty' || true)" @@ -70,7 +85,8 @@ jobs: created=1 fi have="$(curl -fsS "${auth[@]}" "$API/releases/$id/assets" | jq -r '.[].name')" - for f in dist/inbuxa-linux-amd64 dist/inbuxa-linux-arm64 dist/SHA256SUMS; do + for f in dist/inbuxa-linux-amd64 dist/inbuxa-linux-arm64 dist/SHA256SUMS dist/SHA256SUMS.minisig; do + [ -e "$f" ] || continue # .minisig is absent only on an unsigned release n="$(basename "$f")" if grep -qxF "$n" <<<"$have"; then echo "already attached: $n"; continue; fi echo "uploading $n" diff --git a/README.md b/README.md index 3d7d853..def174b 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,15 @@ SHA256SUMS to check them against: sha256sum --check --ignore-missing SHA256SUMS install -m 755 inbuxa-linux-amd64 /usr/local/bin/inbuxa +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 https://git.coffeylabs.org/inbuxa/inbuxa-installer/releases/download/$V/SHA256SUMS.minisig + minisign -Vm SHA256SUMS -P RWS1yFYwVuJ7MGJTZXLbhv9+hrEsjrC8Zg+7WmPlM86Sjy0qF/xkoCKq + +The same public key signs every inbuxa release (installer, migrate and cli). + A release is a tag on main named with the INBUXA suite's release number: `v27.1` for a series, `v27.1.3` for a patch, `v27.1-rc.1` for a release candidate (before 27.1 the tags were dated, `v2026.10.15.2`).