ci(release): manual, batched releases — no release on merge
All checks were successful
ci / test (pull_request) Successful in 3m49s
All checks were successful
ci / test (pull_request) Successful in 3m49s
Drop `push: branches: [main]` from both release workflows. release.yml now runs only via workflow_dispatch, with bump (default minor), version, tag and dry_run inputs; contradictory input is rejected instead of guessed at. android-release.yml keeps the Android assets on the same tag by subscribing to `push: tags: v*.*.*`: creating a tag over the API sends the same push notification a git push does, so the core's tag wakes it. No workflow_call — this Forgejo is 10.0.3, where reusable workflows are not supported. docs/RELEASING.md is the policy and procedure.
This commit is contained in:
parent
acb6c7dd65
commit
6c9fd00b8a
5 changed files with 225 additions and 38 deletions
36
README.md
36
README.md
|
|
@ -25,7 +25,7 @@ Arti onion services are still **experimental**. If the hidden service cannot com
|
|||
|
||||
### Option A — download a release binary
|
||||
|
||||
CI (`.forgejo/workflows/release.yml`) tags and publishes both Linux binaries on every `main` push that touches the core (`src/`, `crates/`, `Cargo.toml`, `Cargo.lock`, or `scripts/release-body.md`). Workflow-only edits do not mint a release — validate those with Actions → release → `dry_run=true`. aarch64 builds on the Pi runner; x86_64 builds on the amd64 runner. Both attach to the same [Forgejo release](https://forgejo.siriusdevops.com/sirius/onionwire/releases). `scripts/build-release-local.sh` remains the offline x86_64 fallback. This Forgejo does not serve `/releases/latest/download/…` (404); pin the tag.
|
||||
CI (`.forgejo/workflows/release.yml`) does **not** release on a merge. Releases are manual and batched: a maintainer runs the workflow at a stopping point (Actions → release → Run workflow, `dry_run=true` first), which tags the next `v*.*.*` version and publishes both Linux binaries — aarch64 on the Pi runner, x86_64 on the amd64 runner — to one [Forgejo release](https://forgejo.siriusdevops.com/sirius/onionwire/releases), with the Android APK + AAR attached to that same tag. Policy and inputs: [docs/RELEASING.md](docs/RELEASING.md). `scripts/build-release-local.sh` remains the offline x86_64 fallback. This Forgejo does not serve `/releases/latest/download/…` (404); pin the tag.
|
||||
|
||||
**x86_64 (most PCs / VMs):**
|
||||
|
||||
|
|
@ -269,20 +269,34 @@ rationale, the 16 KB page-size check and the signing story are in
|
|||
|
||||
## Releases (maintainers)
|
||||
|
||||
A core change on `main` is enough. The release workflow computes the next
|
||||
`v*.*.*` tag (patch+1, or `v0.1.0` if there are no tags), creates it via the
|
||||
API, builds aarch64 on the Pi runner and x86_64 on the amd64 runner, and
|
||||
publishes all four assets (`onionwire-<target>` + `.sha256`) to one release.
|
||||
Do not push tags by hand — a tag-push trigger would start a second run.
|
||||
Releases are **manual and batched**: no merge publishes anything, and neither
|
||||
does a tag push. Cut one when a batch of work has reached a stopping point —
|
||||
CI green on `main`, the feature set landed, no half-merged stack. Full policy
|
||||
and procedure: [`docs/RELEASING.md`](docs/RELEASING.md).
|
||||
|
||||
Actions → release → Run workflow:
|
||||
|
||||
| Input | Meaning |
|
||||
|---|---|
|
||||
| `dry_run` | build + checksum both Linux binaries, no tag, no publish. Run this first. |
|
||||
| `bump` | `patch` / `minor` / `major` off the newest `v*.*.*` tag. Default `minor`. |
|
||||
| `version` | explicit `X.Y.Z` (or `vX.Y.Z`) — overrides `bump`. |
|
||||
| `tag` | rebuild / re-publish an existing tag instead of minting one. |
|
||||
|
||||
Pass `tag` **or** `version`, not both; an unparseable version is rejected
|
||||
rather than guessed at. The workflow computes the version, creates the tag over
|
||||
the API (refusing to move an existing tag), builds aarch64 on the Pi runner and
|
||||
x86_64 on the amd64 runner, and publishes all four assets (`onionwire-<target>`
|
||||
+ `.sha256`) to one release. Creating that tag fires `android-release.yml`,
|
||||
which builds the APK + AAR and joins the same release. If a build or the
|
||||
publish fails, the run deletes the tag it created. Do not push tags by hand —
|
||||
`release.yml` has no tag-push trigger, so a hand-pushed tag would build
|
||||
nothing.
|
||||
|
||||
```bash
|
||||
# optional: keep Cargo.toml in sync with the tag the workflow will mint
|
||||
# (the workflow does not edit Cargo.toml)
|
||||
|
||||
# rebuild / re-publish an existing tag, or dry-run a build with no tag:
|
||||
# Actions → release → Run workflow → tag=vX.Y.Z and/or dry_run=true
|
||||
# (dry_run is how you test release.yml without cutting a user-facing release)
|
||||
|
||||
# offline x86_64 fallback (idempotent — safe to re-run)
|
||||
FORGEJO_TOKEN=<pat> scripts/build-release-local.sh vX.Y.Z
|
||||
```
|
||||
|
|
@ -290,7 +304,7 @@ FORGEJO_TOKEN=<pat> scripts/build-release-local.sh vX.Y.Z
|
|||
Workflows (Forgejo Actions, `.forgejo/workflows/`):
|
||||
|
||||
- [`.forgejo/workflows/ci.yml`](.forgejo/workflows/ci.yml) — `cargo test --locked` + `cargo clippy --all-targets -- -D warnings` on `main` and PRs when `src/`, `crates/`, `tests/`, `Cargo.toml`, `Cargo.lock`, or this workflow change (ignored Tor-live tests are not run). `workflow_dispatch` always runs the suite. Pi runner, `docker` label.
|
||||
- [`.forgejo/workflows/release.yml`](.forgejo/workflows/release.yml) — on core paths to `main` (`src/`, `crates/`, `Cargo.toml`, `Cargo.lock`, `scripts/release-body.md`): next tag, aarch64 (`docker`) + x86_64 (`docker-amd64`), one release. `workflow_dispatch` rebuilds a tag or `dry_run`s. Concurrency group `onionwire-ci-pi` (same as `ci.yml`, `cancel-in-progress: false`) so cargo jobs do not overlap on the Pi. Amd64 dind is serialized by runner `capacity=1`.
|
||||
- [`.forgejo/workflows/release.yml`](.forgejo/workflows/release.yml) — manual, batched release (`workflow_dispatch` only: `dry_run`, `bump`, `version`, `tag`): next tag, aarch64 (`docker`) + x86_64 (`docker-amd64`), one release, fail-closed tag delete on failure. The tag it creates fires [`android-release.yml`](.forgejo/workflows/android-release.yml) (`push: tags: v*.*.*`), which joins the same release with the APK + AAR. Concurrency group `onionwire-ci-pi` (same as `ci.yml`, `cancel-in-progress: false`) so cargo jobs do not overlap on the Pi. Amd64 dind is serialized by runner `capacity=1`.
|
||||
|
||||
Scripts:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue