2026-09-10 13:10:56 -04:00
name : release
2026-09-12 17:57:15 -04:00
# Manual, batched releases. There is deliberately NO push trigger: a merged
# PR does not mint a release. A maintainer dispatches this at a stopping point
# (a batch of work has landed and CI is green on main) — see docs/RELEASING.md.
# Tag-push is intentionally NOT a trigger here: this workflow creates the tag
2026-09-12 18:55:58 -04:00
# via the API, and a tag-push hook would start a second run of the same release.
# (A tag this workflow creates does not wake android-release.yml either — see
# docs/RELEASING.md: on this Forgejo, pushes made with the CI token are
# Actions-user events and are not dispatched back into Actions.)
2026-09-12 17:57:15 -04:00
# Version: explicit `version`, else `bump` off the newest v*.*.* tag
# (default minor — a batched release is usually a feature set); zero tags → v0.1.0.
2026-09-10 13:10:56 -04:00
on :
workflow_dispatch :
inputs :
2026-09-12 17:57:15 -04:00
bump :
description : Bump off the newest v*.*.* tag (ignored when version or tag is set)
required : false
type : choice
options :
- minor
- patch
- major
default : minor
version :
description : Explicit version MAJOR.MINOR.PATCH (or vMAJOR.MINOR.PATCH); overrides bump
required : false
type : string
2026-09-10 13:10:56 -04:00
tag :
2026-09-12 17:57:15 -04:00
description : Existing tag to (re)build and publish (empty = create the next version)
2026-09-12 00:52:46 -04:00
required : false
type : string
dry_run :
2026-09-12 00:55:18 -04:00
description : Build and checksum without creating a tag or publishing (true/false)
2026-09-12 00:52:46 -04:00
required : false
2026-09-12 00:55:18 -04:00
type : string
default : "false"
2026-09-12 00:52:46 -04:00
2026-09-12 01:09:46 -04:00
# Same group as ci.yml: both cargo builds share the Pi's 4 cores and the
# onionwire-cargo-registry volume. A separate group raced tests and produced
# Permission denied (os error 13) on /target/debug/deps/* binaries.
2026-09-12 00:52:46 -04:00
concurrency :
2026-09-12 01:09:46 -04:00
group : onionwire-ci-pi
2026-09-12 00:52:46 -04:00
cancel-in-progress : false
2026-09-10 13:10:56 -04:00
env :
CARGO_TERM_COLOR : never
2026-10-08 17:41:22 -04:00
# Same floor as ci.yml: the release binary has `cuprate-daemon` on by default,
# and `tapes` does not build on 1.91 (`VecDeque::pop_front_if`, stable in 1.93).
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# Pinned by DIGEST, not by tag. `rust:1.98-bookworm` floats: a rustc patch
# release changes codegen and therefore every published hash — which turns a
# routine toolchain bump into an unexplainable reproducibility mismatch for
# anyone verifying an old release. rustc in this digest is 1.98.1
# (48a229cea), LLVM 21.1.2, host x86_64-unknown-linux-gnu. 1.98 is the floor
# for the default feature set (see Cargo.toml rust-version).
#
# This digest IS the release recipe, and it must match BUILDER_IMAGE in
# scripts/verify-reproducible.sh and scripts/build-release-local.sh. If they
# disagree, a verifier rebuilds with a different toolchain than CI shipped and
# reports a false mismatch. Bump all of them in one commit — docs/VERIFY.md.
RUST_IMAGE : rust@sha256:93ce27a88655056a51dbdd8f5f2d7ddc071c7b0070fb288a37b5a285fc83971e
2026-09-12 01:30:16 -04:00
# Not baking pkg-config/libssl-dev into a custom image on this card —
# dind PVC would make that the durable fix for the apt loop. Filed separately.
2026-09-10 13:10:56 -04:00
CARGO_REGISTRY_VOLUME : onionwire-cargo-registry
jobs :
2026-09-12 00:52:46 -04:00
version :
runs-on : docker
timeout-minutes : 10
outputs :
tag : ${{ steps.plan.outputs.tag }}
sha : ${{ steps.plan.outputs.sha }}
dry_run : ${{ steps.plan.outputs.dry_run }}
created_tag : ${{ steps.plan.outputs.created_tag }}
steps :
- name : Plan version, create tag unless dry_run
id : plan
env :
FORGEJO_TOKEN : ${{ secrets.FORGEJO_TOKEN }}
REPO_API : ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
EVENT_NAME : ${{ github.event_name }}
EVENT_SHA : ${{ github.sha }}
2026-09-12 17:57:15 -04:00
INPUT_BUMP : ${{ github.event.inputs.bump }}
INPUT_VERSION : ${{ github.event.inputs.version }}
2026-09-12 00:52:46 -04:00
INPUT_TAG : ${{ github.event.inputs.tag }}
INPUT_DRY_RUN : ${{ github.event.inputs.dry_run }}
run : |
set -euo pipefail
: "${FORGEJO_TOKEN:?FORGEJO_TOKEN secret is not set}"
2026-09-12 00:55:18 -04:00
FORGEJO_TOKEN=$(printf '%s' "$FORGEJO_TOKEN" | tr -d '\r\n')
2026-09-12 00:52:46 -04:00
dry_run=false
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
case "${INPUT_DRY_RUN:-false}" in
2026-09-12 00:55:18 -04:00
true |True|TRUE|1|yes|YES) dry_run=true ;;
2026-09-12 00:52:46 -04:00
esac
fi
2026-09-12 17:57:15 -04:00
echo "event=$EVENT_NAME sha=$EVENT_SHA input_version=${INPUT_VERSION-} input_tag=${INPUT_TAG-} input_bump=${INPUT_BUMP-} input_dry_run=${INPUT_DRY_RUN-} dry_run=$dry_run"
2026-09-12 00:52:46 -04:00
api_curl() {
curl -sS --http1.1 --retry 5 --retry-all-errors --retry-delay 3 \
2026-09-12 00:55:18 -04:00
--connect-timeout 20 --max-time 60 \
2026-09-13 15:27:57 -04:00
-u "sirius:${FORGEJO_TOKEN}" "$@" | sed 's/\r$//'
2026-09-12 00:52:46 -04:00
}
input_tag="${INPUT_TAG:-}"
2026-09-12 17:57:15 -04:00
version_input="${INPUT_VERSION:-}"
bump="${INPUT_BUMP:-minor}"
# Contradictory input is rejected, never guessed at.
if [ -n "$input_tag" ] && [ -n "$version_input" ]; then
echo "got both tag='$input_tag' and version='$version_input': tag rebuilds an existing tag, version mints a new one — pass one" >&2
exit 1
fi
2026-09-12 00:52:46 -04:00
if [ -n "$input_tag" ]; then
code=$(api_curl -o /tmp/tag.json -w '%{http_code}' \
"$REPO_API/tags/$input_tag" )
if [ "$code" != "200" ]; then
echo "dispatch tag $input_tag not found (HTTP $code)" >&2
cat /tmp/tag.json >&2 || true
exit 1
fi
sha=$(python3 -c "import json; print(json.load(open('/tmp/tag.json'))['commit']['sha'])")
tag="$input_tag"
created=false
echo "re-publish existing tag $tag at $sha (dry_run=$dry_run)"
else
2026-09-12 17:57:15 -04:00
if [ -n "$version_input" ]; then
tag=$(python3 -c "import re,sys; m=re.fullmatch(r'v?([0-9]+)\.([0-9]+)\.([0-9]+)', sys.argv[1].strip()); print('v' + '.'.join(m.groups()) if m else '')" "$version_input")
if [ -z "$tag" ]; then
echo "version must be MAJOR.MINOR.PATCH or vMAJOR.MINOR.PATCH, got '$version_input'" >&2
exit 1
fi
else
case "$bump" in
patch|minor|major) ;;
*) echo "bump must be patch|minor|major, got '$bump'" >&2; exit 1 ;;
esac
api_curl "$REPO_API/tags?limit=50" -o /tmp/tags.json
latest=$(python3 -c "import json,re; tags=json.load(open('/tmp/tags.json')); assert isinstance(tags, list), tags; s=[tuple(int(x) for x in m.groups()) for t in tags for m in [re.fullmatch(r'v([0-9]+)\.([0-9]+)\.([0-9]+)', t.get('name') or '')] if m]; print('%d.%d.%d' % max(s) if s else '')")
if [ -z "$latest" ]; then
tag="v0.1.0"
else
major="${latest%%.*}"
rest="${latest#*.}"
minor="${rest%%.*}"
patch="${rest#*.}"
case "$bump" in
major) tag="v$((major + 1)).0.0" ;;
minor) tag="v$major.$((minor + 1)).0" ;;
patch) tag="v$major.$minor.$((patch + 1))" ;;
esac
fi
fi
2026-09-12 00:52:46 -04:00
sha="$EVENT_SHA"
created=false
if [ "$dry_run" = "true" ]; then
echo "dry_run: would use $tag on $sha (no tag created)"
else
code=$(api_curl -o /tmp/tag.json -w '%{http_code}' \
"$REPO_API/tags/$tag" )
if [ "$code" = "200" ]; then
existing=$(python3 -c "import json; print(json.load(open('/tmp/tag.json'))['commit']['sha'])")
if [ "$existing" != "$sha" ]; then
echo "tag $tag exists on $existing, not moving from $sha" >&2
exit 1
fi
echo "tag $tag already exists on $sha — joining"
elif [ "$code" = "404" ]; then
2026-09-12 18:55:58 -04:00
python3 -c "import json,sys; json.dump({'tag_name':sys.argv[1],'target':sys.argv[2],'message':'OnionWire '+sys.argv[1]}, sys.stdout)" \
"$tag" "$sha" > /tmp/tag-create.json
echo "tag-create payload $(wc -c < /tmp/tag-create.json) bytes"
create_code=$(api_curl -o /tmp/tag-created.json -w '%{http_code}' \
-X POST -H "Content-Type: application/json" \
--data-binary @/tmp/tag-create.json \
"$REPO_API/tags" )
if [ "$create_code" = "201" ]; then
created=true
echo "created tag $tag on $sha"
elif [ "$create_code" = "409" ]; then
echo "tag $tag created concurrently — joining"
else
echo "creating tag $tag failed HTTP $create_code" >&2
cat /tmp/tag-created.json >&2 || true
2026-09-12 00:52:46 -04:00
exit 1
fi
else
echo "GET tags/$tag failed HTTP $code" >&2
cat /tmp/tag.json >&2 || true
exit 1
fi
fi
fi
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "sha=$sha" >> "$GITHUB_OUTPUT"
echo "dry_run=$dry_run" >> "$GITHUB_OUTPUT"
echo "created_tag=$created" >> "$GITHUB_OUTPUT"
echo "plan: tag=$tag sha=$sha dry_run=$dry_run created_tag=$created"
2026-09-10 13:10:56 -04:00
aarch64 :
2026-09-12 00:52:46 -04:00
needs : version
2026-09-10 13:10:56 -04:00
runs-on : docker
timeout-minutes : 120
2026-09-12 00:52:46 -04:00
env :
TARGET : aarch64-unknown-linux-gnu
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# Per-run, and removed at the end of the job: a reused target dir lets the
# published binary come out of cached artifacts, which is precisely what a
# verifier rebuilding from an empty directory cannot reproduce.
CARGO_TARGET_VOLUME : onionwire-target-release-${{ github.run_id }}-aarch64
2026-09-12 00:52:46 -04:00
BUILD_CONTAINER : onionwire-release-${{ github.run_id }}-aarch64
2026-09-10 13:10:56 -04:00
steps :
2026-09-12 00:52:46 -04:00
- name : Checkout source
2026-09-10 13:10:56 -04:00
uses : https://code.forgejo.org/actions/checkout@v4
2026-09-10 13:12:39 -04:00
with :
2026-09-12 00:52:46 -04:00
ref : ${{ needs.version.outputs.sha }}
- name : Show runner arch
run : uname -m && echo "target=$TARGET"
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
- name : Resolve SOURCE_DATE_EPOCH from the released commit
id : epoch
run : |
set -euo pipefail
cd "${GITHUB_WORKSPACE}"
# The released commit's committer time, not "now". A rebuild of this
# tag in six months has to hand the compiler the same epoch CI handed
# it, or the two builds cannot match and every verification is noise.
epoch=$(git log -1 --format=%ct "${{ needs.version.outputs.sha }}")
case "$epoch" in
'' |*[!0-9]*) echo "could not read a commit time for ${{ needs.version.outputs.sha }}" >&2; exit 1 ;;
esac
echo "epoch=$epoch" >> "$GITHUB_OUTPUT"
echo "SOURCE_DATE_EPOCH=$epoch"
- name : Build ${{ env.TARGET }} in the pinned rust container
env :
SOURCE_DATE_EPOCH : ${{ steps.epoch.outputs.epoch }}
RELEASE_SHA : ${{ needs.version.outputs.sha }}
2026-09-12 00:52:46 -04:00
run : |
set -euo pipefail
cd "${GITHUB_WORKSPACE}"
echo "workspace: $GITHUB_WORKSPACE"
docker volume create "$CARGO_REGISTRY_VOLUME" > /dev/null
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# Fresh per run (see the job env): the published artifact has to be
# reproducible from an empty target dir, so it is not allowed to come
# out of a cache that a verifier does not have.
2026-09-12 00:52:46 -04:00
docker volume create "$CARGO_TARGET_VOLUME" > /dev/null
docker rm -f "$BUILD_CONTAINER" > /dev/null 2>&1 || true
docker create --name "$BUILD_CONTAINER" -i \
-e CARGO_TARGET_DIR=/target \
-e CARGO_BUILD_JOBS=2 \
-e CARGO_TERM_COLOR=never \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
-e BUILDER_IMAGE="$RUST_IMAGE" \
-e TARGET_TRIPLE="$TARGET" \
-e GIT_SHA="$RELEASE_SHA" \
-e OUT=/out \
2026-09-12 00:52:46 -04:00
-v "$CARGO_REGISTRY_VOLUME":/usr/local/cargo/registry \
-v "$CARGO_TARGET_VOLUME":/target \
-w /src \
"$RUST_IMAGE" \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
sh -euxc 'mkdir -p /src /out && tar xzf - -C /src && cd /src && bash /src/scripts/reproducible-build.sh'
2026-09-12 00:52:46 -04:00
tar czf - --exclude=./target --exclude=./.git --exclude=./.worktrees \
--exclude=./.ci-tools . \
| docker start -a -i "$BUILD_CONTAINER"
mkdir -p dist
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# The recipe writes the stripped binary, its .sha256 and the build-info
# record into /out, and installs its own apt build deps — the caller
# supplies only the source tree and the pinned epoch.
docker cp "$BUILD_CONTAINER:/out/." dist/
2026-09-12 00:52:46 -04:00
docker rm -f "$BUILD_CONTAINER" > /dev/null
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
docker volume rm "$CARGO_TARGET_VOLUME" > /dev/null
2026-09-12 00:52:46 -04:00
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
- name : Verify the recipe's dist output
2026-09-12 00:52:46 -04:00
run : |
set -euo pipefail
cd "${GITHUB_WORKSPACE}/dist"
ls -l
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# scripts/reproducible-build.sh owns the checksum and the build-info
# record. This step only refuses to hand a half-made dist to publish.
for f in "onionwire-$TARGET" "onionwire-$TARGET.sha256" "build-info-$TARGET.txt"; do
if [ ! -s "$f" ]; then
echo "missing or empty dist asset: $f" >&2
exit 1
fi
done
sha256sum -c "onionwire-$TARGET.sha256"
file "onionwire-$TARGET"
cat "build-info-$TARGET.txt"
2026-09-12 00:52:46 -04:00
- name : Upload dist artifact
uses : https://code.forgejo.org/actions/upload-artifact@v3
with :
name : onionwire-aarch64-unknown-linux-gnu
path : dist/
if-no-files-found : error
retention-days : 1
2026-09-10 13:10:56 -04:00
2026-09-12 00:52:46 -04:00
x86_64 :
needs : version
runs-on : docker-amd64
timeout-minutes : 120
env :
TARGET : x86_64-unknown-linux-gnu
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# Per-run, and removed at the end of the job: a reused target dir lets the
# published binary come out of cached artifacts, which is precisely what a
# verifier rebuilding from an empty directory cannot reproduce.
CARGO_TARGET_VOLUME : onionwire-target-release-${{ github.run_id }}-x86_64
2026-09-12 00:52:46 -04:00
BUILD_CONTAINER : onionwire-release-${{ github.run_id }}-x86_64
steps :
- name : Checkout source
2026-09-10 13:58:46 -04:00
uses : https://code.forgejo.org/actions/checkout@v4
with :
2026-09-12 00:52:46 -04:00
ref : ${{ needs.version.outputs.sha }}
- name : Show runner arch
run : uname -m && echo "target=$TARGET"
2026-09-10 13:58:46 -04:00
2026-09-12 01:03:22 -04:00
- name : Ensure docker CLI (amd64 dind job image has none)
run : |
set -euo pipefail
if ! command -v docker >/dev/null 2>&1; then
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz \
| tar xz -C /tmp
install -m 755 /tmp/docker/docker /usr/local/bin/docker
fi
docker version
if [ ! -S /var/run/docker.sock ]; then
echo "docker.sock is not mounted into the job container" >&2
ls -l /var/run || true
exit 1
fi
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
- name : Resolve SOURCE_DATE_EPOCH from the released commit
id : epoch
run : |
set -euo pipefail
cd "${GITHUB_WORKSPACE}"
# The released commit's committer time, not "now". A rebuild of this
# tag in six months has to hand the compiler the same epoch CI handed
# it, or the two builds cannot match and every verification is noise.
epoch=$(git log -1 --format=%ct "${{ needs.version.outputs.sha }}")
case "$epoch" in
'' |*[!0-9]*) echo "could not read a commit time for ${{ needs.version.outputs.sha }}" >&2; exit 1 ;;
esac
echo "epoch=$epoch" >> "$GITHUB_OUTPUT"
echo "SOURCE_DATE_EPOCH=$epoch"
- name : Build ${{ env.TARGET }} in the pinned rust container
env :
SOURCE_DATE_EPOCH : ${{ steps.epoch.outputs.epoch }}
RELEASE_SHA : ${{ needs.version.outputs.sha }}
2026-09-10 13:10:56 -04:00
run : |
set -euo pipefail
2026-09-10 13:50:57 -04:00
cd "${GITHUB_WORKSPACE}"
echo "workspace: $GITHUB_WORKSPACE"
2026-09-10 13:10:56 -04:00
docker volume create "$CARGO_REGISTRY_VOLUME" > /dev/null
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# Fresh per run (see the job env): the published artifact has to be
# reproducible from an empty target dir, so it is not allowed to come
# out of a cache that a verifier does not have.
2026-09-10 13:10:56 -04:00
docker volume create "$CARGO_TARGET_VOLUME" > /dev/null
docker rm -f "$BUILD_CONTAINER" > /dev/null 2>&1 || true
docker create --name "$BUILD_CONTAINER" -i \
-e CARGO_TARGET_DIR=/target \
-e CARGO_BUILD_JOBS=2 \
-e CARGO_TERM_COLOR=never \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
-e BUILDER_IMAGE="$RUST_IMAGE" \
-e TARGET_TRIPLE="$TARGET" \
-e GIT_SHA="$RELEASE_SHA" \
-e OUT=/out \
2026-09-10 13:10:56 -04:00
-v "$CARGO_REGISTRY_VOLUME":/usr/local/cargo/registry \
-v "$CARGO_TARGET_VOLUME":/target \
-w /src \
"$RUST_IMAGE" \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
sh -euxc 'mkdir -p /src /out && tar xzf - -C /src && cd /src && bash /src/scripts/reproducible-build.sh'
2026-09-10 13:58:46 -04:00
tar czf - --exclude=./target --exclude=./.git --exclude=./.worktrees \
--exclude=./.ci-tools . \
2026-09-10 13:10:56 -04:00
| docker start -a -i "$BUILD_CONTAINER"
mkdir -p dist
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# The recipe writes the stripped binary, its .sha256 and the build-info
# record into /out, and installs its own apt build deps — the caller
# supplies only the source tree and the pinned epoch.
docker cp "$BUILD_CONTAINER:/out/." dist/
2026-09-10 13:10:56 -04:00
docker rm -f "$BUILD_CONTAINER" > /dev/null
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
docker volume rm "$CARGO_TARGET_VOLUME" > /dev/null
2026-09-10 13:10:56 -04:00
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
- name : Verify the recipe's dist output
2026-09-10 13:10:56 -04:00
run : |
set -euo pipefail
2026-09-10 13:50:57 -04:00
cd "${GITHUB_WORKSPACE}/dist"
2026-09-10 13:10:56 -04:00
ls -l
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# scripts/reproducible-build.sh owns the checksum and the build-info
# record. This step only refuses to hand a half-made dist to publish.
for f in "onionwire-$TARGET" "onionwire-$TARGET.sha256" "build-info-$TARGET.txt"; do
if [ ! -s "$f" ]; then
echo "missing or empty dist asset: $f" >&2
exit 1
fi
done
sha256sum -c "onionwire-$TARGET.sha256"
file "onionwire-$TARGET"
cat "build-info-$TARGET.txt"
2026-09-10 13:10:56 -04:00
2026-09-12 00:52:46 -04:00
- name : Upload dist artifact
uses : https://code.forgejo.org/actions/upload-artifact@v3
with :
name : onionwire-x86_64-unknown-linux-gnu
path : dist/
if-no-files-found : error
retention-days : 1
publish :
needs : [ version, aarch64, x86_64]
2026-09-12 03:01:14 -04:00
# Always run after version so a failed build still hits the fail-closed
# delete step (a skipped publish left act without a job result).
2026-09-12 02:51:07 -04:00
# Pi runner, not docker-amd64: the amd64 dind runner is capacity=1 and
# android-release sat in front of run 116's publish for ~1h; the Pi
# already created the tag over the public API (version job), so publish
2026-10-20 23:01:09 -04:00
# uses that same path. This job needs the docker CLI for one thing only —
# running scripts/sign-release.sh in the pinned builder image — and it uses
# a named volume + docker cp, never a bind mount of $GITHUB_WORKSPACE
# (that path exists only inside this container; docker resolves a -v source
# on the host and hands the container an empty /work — run 768).
2026-09-12 03:01:14 -04:00
# Fail-closed tag delete lives as a step here: a sibling cleanup job ran
# after a successful publish (act treats needs.publish.result as unset, so
# != success) and Early-terminated on run 135. Do not restore that job.
2026-09-12 01:30:16 -04:00
if : always() && needs.version.result == 'success'
2026-09-12 02:51:07 -04:00
runs-on : docker
2026-09-12 00:52:46 -04:00
timeout-minutes : 20
steps :
2026-09-12 01:30:16 -04:00
- name : Skip publish on dry_run
if : needs.version.outputs.dry_run == 'true'
run : echo "dry_run not publishing"
- name : Fail closed if a build failed
if : needs.version.outputs.dry_run != 'true' && (needs.aarch64.result != 'success' || needs.x86_64.result != 'success')
run : |
echo "aarch64=${{ needs.aarch64.result }} x86_64=${{ needs.x86_64.result }}" >&2
exit 1
2026-09-12 00:52:46 -04:00
- name : Checkout CI tooling
2026-09-12 01:30:16 -04:00
if : needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
2026-09-12 00:52:46 -04:00
uses : https://code.forgejo.org/actions/checkout@v4
with :
path : .ci-tools
- name : Download both arch artifacts
2026-09-12 01:30:16 -04:00
if : needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
2026-09-12 00:52:46 -04:00
uses : https://code.forgejo.org/actions/download-artifact@v3
with :
path : artifacts
2026-10-20 23:01:09 -04:00
- name : Stage both arch artifacts into dist
if : needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
run : |
set -euo pipefail
# Everything the signer signs must already be in dist/ when the sign
# step runs. This loop used to live inside the publish step, i.e.
# AFTER the signature step, so signing ran against an empty dist/.
mkdir -p dist
find artifacts -type f -print
for target in aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu; do
for name in "onionwire-$target" "onionwire-$target.sha256" "build-info-$target.txt"; do
src=$(find artifacts -type f -name "$name" -print -quit)
if [ -z "$src" ]; then
echo "missing artifact: $name" >&2
find artifacts -type f >&2 || true
exit 1
fi
cp "$src" "dist/$name"
done
done
ls -l dist
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
- name : Sign the release assets (minisign, fail closed)
if : needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
env :
MINISIGN_SECRET_KEY : ${{ secrets.MINISIGN_SECRET_KEY }}
RELEASE_TAG : ${{ needs.version.outputs.tag }}
2026-10-20 23:01:09 -04:00
SIGN_VOLUME : onionwire-sign-${{ github.run_id }}
SIGN_CONTAINER : onionwire-sign-${{ github.run_id }}
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
run : |
set -euo pipefail
# Signing runs BEFORE publish on purpose. A run without the key stops
# here, so nothing unsigned ever reaches the release page: an unsigned
# release is indistinguishable from a signed one to anyone who is not
# checking, which makes it worse than no release at all.
if [ -z "${MINISIGN_SECRET_KEY:-}" ]; then
echo "MINISIGN_SECRET_KEY is not set — add it in Settings -> Actions -> Secrets." >&2
echo "See docs/VERIFY.md, \"Maintainer: the signing key\"." >&2
exit 1
fi
2026-10-20 23:01:09 -04:00
# NO `-v "${GITHUB_WORKSPACE}:/work"`: GITHUB_WORKSPACE is a path
# INSIDE this job container, but docker resolves a bind mount's source
# on the HOST, where it does not exist. Docker then creates an empty
# /work and the sign script is simply absent (run 768: "bash:
# .ci-tools/scripts/sign-release.sh: No such file or directory").
# Same pattern as the build jobs: named volume + docker cp in/out.
# minisign still comes from the same pinned image the builds used, so
# our signature and the verifier's check are the same implementation.
cleanup() {
docker rm -f "$SIGN_CONTAINER" >/dev/null 2>&1 || true
docker volume rm "$SIGN_VOLUME" >/dev/null 2>&1 || true
}
trap cleanup EXIT
docker volume create "$SIGN_VOLUME" >/dev/null
docker rm -f "$SIGN_CONTAINER" >/dev/null 2>&1 || true
docker create --name "$SIGN_CONTAINER" \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
-e MINISIGN_SECRET_KEY \
-e RELEASE_TAG \
2026-10-20 23:01:09 -04:00
-v "$SIGN_VOLUME:/work" \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
-w /work \
"$RUST_IMAGE" \
bash -c 'apt-get update -qq && apt-get install -y -qq --no-install-recommends minisign >/dev/null \
2026-10-20 23:01:09 -04:00
&& bash /work/scripts/sign-release.sh \
/work/dist/onionwire-aarch64-unknown-linux-gnu \
/work/dist/onionwire-aarch64-unknown-linux-gnu.sha256 \
/work/dist/onionwire-x86_64-unknown-linux-gnu \
/work/dist/onionwire-x86_64-unknown-linux-gnu.sha256'
docker cp .ci-tools/scripts "$SIGN_CONTAINER:/work/scripts"
docker cp dist/. "$SIGN_CONTAINER:/work/dist/"
docker start -a "$SIGN_CONTAINER"
docker cp "$SIGN_CONTAINER:/work/dist/." dist/
# Verify the signatures came back out before anything is published.
for f in \
dist/onionwire-aarch64-unknown-linux-gnu.minisig \
dist/onionwire-aarch64-unknown-linux-gnu.sha256.minisig \
dist/onionwire-x86_64-unknown-linux-gnu.minisig \
dist/onionwire-x86_64-unknown-linux-gnu.sha256.minisig
do
[ -s "$f" ] || { echo "signing produced no $f" >&2; exit 1; }
done
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
# The public key ships as an asset too, so a verifier can get it from
# the release; getting it from the repo instead is stronger, and
# docs/VERIFY.md says so.
cp .ci-tools/scripts/onionwire-signing.pub dist/onionwire-signing.pub
2026-09-12 00:52:46 -04:00
- name : Publish both binaries to one release
2026-09-12 01:30:16 -04:00
if : needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
2026-09-10 13:10:56 -04:00
env :
FORGEJO_TOKEN : ${{ secrets.FORGEJO_TOKEN }}
REPO_API : ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
2026-09-12 00:52:46 -04:00
TAG : ${{ needs.version.outputs.tag }}
2026-09-10 13:10:56 -04:00
run : |
set -euo pipefail
2026-10-20 23:01:09 -04:00
# dist/ is staged and signed by the two steps above; this step only
# refuses to upload a hole in it.
find dist -type f -print
2026-09-12 00:52:46 -04:00
missing=0
for f in \
dist/onionwire-aarch64-unknown-linux-gnu \
dist/onionwire-aarch64-unknown-linux-gnu.sha256 \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
dist/onionwire-aarch64-unknown-linux-gnu.minisig \
dist/onionwire-aarch64-unknown-linux-gnu.sha256.minisig \
dist/build-info-aarch64-unknown-linux-gnu.txt \
2026-09-12 00:52:46 -04:00
dist/onionwire-x86_64-unknown-linux-gnu \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
dist/onionwire-x86_64-unknown-linux-gnu.sha256 \
dist/onionwire-x86_64-unknown-linux-gnu.minisig \
dist/onionwire-x86_64-unknown-linux-gnu.sha256.minisig \
dist/build-info-x86_64-unknown-linux-gnu.txt \
dist/onionwire-signing.pub
2026-09-12 00:52:46 -04:00
do
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
if [ ! -s "$f" ]; then
echo "refusing to publish missing or empty asset $f" >&2
2026-09-12 00:52:46 -04:00
missing=1
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
continue
2026-09-12 00:52:46 -04:00
fi
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
bytes=$(wc -c < "$f")
echo "on disk: $f $bytes bytes"
2026-09-12 00:52:46 -04:00
file "$f" || true
done
if [ "$missing" -ne 0 ]; then
exit 1
fi
echo "publishing $TAG from $REPO_API"
2026-09-10 13:58:46 -04:00
.ci-tools/scripts/publish-release.sh \
2026-09-12 00:52:46 -04:00
"$TAG" "OnionWire $TAG" \
2026-09-10 13:58:46 -04:00
.ci-tools/scripts/release-body.md \
2026-09-12 00:52:46 -04:00
dist/onionwire-aarch64-unknown-linux-gnu \
dist/onionwire-aarch64-unknown-linux-gnu.sha256 \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
dist/onionwire-aarch64-unknown-linux-gnu.minisig \
dist/onionwire-aarch64-unknown-linux-gnu.sha256.minisig \
dist/build-info-aarch64-unknown-linux-gnu.txt \
2026-09-12 00:52:46 -04:00
dist/onionwire-x86_64-unknown-linux-gnu \
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
dist/onionwire-x86_64-unknown-linux-gnu.sha256 \
dist/onionwire-x86_64-unknown-linux-gnu.minisig \
dist/onionwire-x86_64-unknown-linux-gnu.sha256.minisig \
dist/build-info-x86_64-unknown-linux-gnu.txt \
dist/onionwire-signing.pub
2026-09-12 00:52:46 -04:00
2026-09-12 03:01:14 -04:00
- name : Delete tag we created if this job failed
if : failure() && needs.version.outputs.created_tag == 'true' && needs.version.outputs.dry_run != 'true'
2026-09-12 00:52:46 -04:00
env :
FORGEJO_TOKEN : ${{ secrets.FORGEJO_TOKEN }}
REPO_API : ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
TAG : ${{ needs.version.outputs.tag }}
run : |
set -euo pipefail
2026-09-12 01:09:46 -04:00
FORGEJO_TOKEN=$(printf '%s' "$FORGEJO_TOKEN" | tr -d '\r\n')
2026-09-12 00:52:46 -04:00
echo "fail-closed: removing tag $TAG created by this run"
code=$(curl -sS --http1.1 -o /tmp/rel.json -w '%{http_code}' \
2026-09-13 15:27:57 -04:00
-u "sirius:${FORGEJO_TOKEN}" \
2026-09-12 00:52:46 -04:00
"$REPO_API/releases/tags/$TAG" )
if [ "$code" = "200" ]; then
rid=$(python3 -c "import json; print(json.load(open('/tmp/rel.json'))['id'])")
echo "deleting incomplete release id $rid"
2026-09-12 01:09:46 -04:00
curl -sS --http1.1 -X DELETE \
2026-09-13 15:27:57 -04:00
-u "sirius:${FORGEJO_TOKEN}" \
2026-09-12 00:52:46 -04:00
"$REPO_API/releases/$rid" -o /dev/null -w "DELETE release HTTP %{http_code}\n"
else
echo "no release for $TAG (HTTP $code)"
fi
2026-09-12 01:09:46 -04:00
del=$(curl -sS --http1.1 -o /tmp/tag-del.json -w '%{http_code}' -X DELETE \
2026-09-13 15:27:57 -04:00
-u "sirius:${FORGEJO_TOKEN}" \
2026-09-12 01:09:46 -04:00
"$REPO_API/tags/$TAG" )
echo "DELETE tag HTTP $del"
if [ "$del" != "204" ] && [ "$del" != "404" ]; then
cat /tmp/tag-del.json >&2 || true
exit 1
fi