ci(release): auto-tag and publish aarch64+x86_64 on main
Some checks failed
ci / test (pull_request) Failing after 2m16s

Drop the tag-push trigger so API-created tags cannot start a second run.
Core paths on main (or workflow_dispatch) mint the next v*.*.* tag
(v0.1.0 when none exist), build both arches in CI, and publish one
release. dry_run builds without tagging. Fail closed on empty assets.
This commit is contained in:
Sirius DevOps 2026-09-12 00:52:46 -04:00
commit 111b95c3ae
No known key found for this signature in database
5 changed files with 325 additions and 68 deletions

View file

@ -1,12 +1,13 @@
#!/usr/bin/env bash
# Build the x86_64 release asset on this host and publish it to the Forgejo
# release for <tag>. CI (.forgejo/workflows/release.yml) only covers aarch64 —
# there is no x86_64 runner on the instance, so this is the x86_64 path.
# Offline fallback: build the x86_64 release asset on this host and publish it
# to the Forgejo release for <tag>. CI (.forgejo/workflows/release.yml) now
# builds both aarch64 (Pi runner) and x86_64 (amd64 runner). Use this script
# when you cannot wait for CI or the amd64 runner is down.
#
# Usage: FORGEJO_TOKEN=... scripts/build-release-local.sh v0.1.2
# Usage: FORGEJO_TOKEN=... scripts/build-release-local.sh v0.1.0
#
# Does not create or push the tag: tag and push first, then run this so the
# release body/asset set matches a real tag. Idempotent (assets are replaced).
# Does not create or push the tag: the release workflow owns tagging. Idempotent
# (same-named assets are replaced). Never moves an existing tag.
set -euo pipefail
tag="${1:?usage: build-release-local.sh <tag>}"

View file

@ -100,8 +100,13 @@ for a in json.load(sys.stdin):
-H "Authorization: Bearer $FORGEJO_TOKEN" \
-F "attachment=@$f" -o /tmp/release-asset.json
python3 -c "
import json;d=json.load(open('/tmp/release-asset.json'))
print('publish: uploaded', d['name'], d['size'], 'bytes')"
import json,sys
d=json.load(open('/tmp/release-asset.json'))
name, size = d.get('name'), d.get('size')
print('publish: uploaded', name, size, 'bytes')
if not size:
sys.exit('publish: server stored 0-byte asset %s — refusing to continue' % (name,))
"
done
api_curl -s -H "Authorization: Bearer $FORGEJO_TOKEN" "$api/releases/$rid/assets" \

View file

@ -3,13 +3,13 @@
Prebuilt Linux binaries. No `tor` package required — Arti runs in-process.
```bash
# aarch64 (Raspberry Pi, ARM servers) — CI builds this one on the Pi runner
# aarch64 (Raspberry Pi, ARM servers)
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/@TAG@/onionwire-aarch64-unknown-linux-gnu
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/@TAG@/onionwire-aarch64-unknown-linux-gnu.sha256
sha256sum -c onionwire-aarch64-unknown-linux-gnu.sha256
chmod +x onionwire-aarch64-unknown-linux-gnu
# x86_64 (most PCs / VMs) — built locally with scripts/build-release-local.sh
# x86_64 (most PCs / VMs)
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/@TAG@/onionwire-x86_64-unknown-linux-gnu
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/@TAG@/onionwire-x86_64-unknown-linux-gnu.sha256
sha256sum -c onionwire-x86_64-unknown-linux-gnu.sha256