ci(release): manual, batched releases — no release on every merge #62

Merged
sirius merged 2 commits from wt/t_95e0d607 into main 2026-09-12 22:29:20 +00:00
Owner

Policy

Releases become manual and batched. A merge publishes nothing.

  • release.yml loses push: branches: [main] and is now workflow_dispatch
    only. Inputs: bump (patch|minor|major, default minor), version
    (explicit X.Y.Z/vX.Y.Z, overrides bump), tag (rebuild an existing
    tag), dry_run (build + checksum, no tag, no publish).
  • Contradictory input is rejected, not guessed at: tag + version
    together, an unparseable version, or a bump outside patch|minor|major
    all fail in the version job with a message.
  • The fail-closed tag delete and the "refuse to move an existing tag" check are
    unchanged.
  • android-release.yml loses push: branches: [main] too, and gains
    push: tags: ['v*.*.*'] so the APK + AAR still reach the release a manual
    dispatch creates (see below).
  • New docs/RELEASING.md documents the policy, the inputs, what the run does,
    the Android attachment, rebuilding a tag, and what the workflows do not
    gate on (no "CI green" check inside the release run — the operator checks it).

Which push would previously have started a release

Before this PR, .forgejo/workflows/release.yml had
on.push.branches: [main] with paths: src/**, crates/**, Cargo.toml, Cargo.lock, scripts/release-body.md. So any merge to main that touched
src/, crates/, Cargo.toml, Cargo.lock or scripts/release-body.md

minted a tag and published both Linux binaries — e.g. PR #43 (SQLCipher store),
#44 (Android Keystore), #45 (outbox), #46 (zeroize), #47, #48, #49, each of
which produced a v0.1.x release today (v0.1.1 … v0.1.6).

android-release.yml separately fired on any merge to main touching
android/app/**, android/sdk/**, android/*.gradle.kts, android/gradle/**,
android/gradle.properties, android/settings.gradle.kts,
scripts/build-android-local.sh or that workflow file
, i.e. a merge like
PR #44 would have auto-published an APK/AAR.

Post-merge confirmation (for the maintainer to run, not claimed here): after
this lands, a push to main touching src/** (or android/**) must produce
no release and no android-release run. Post-merge pushes to main
are now the only way a release workflow could still be reached by a merge, and
neither file has a branches: [main] trigger any more:

$ grep -n "push:" .forgejo/workflows/release.yml .forgejo/workflows/android-release.yml
.forgejo/workflows/android-release.yml:24:  push:

How the Android assets reach the release without a push trigger

The card offered two options; this PR uses the decoupled one —
push: tags: ['v*.*.*'] — because the other one is not available on this
instance:

  • workflow_call is not supported here. This Forgejo is
    10.0.3+gitea-1.22.0 (GET /api/v1/version); reusable workflows only appear
    in the Forgejo docs from v12 onward (v11's reference has no
    workflow_call section, v12's does), so a caller job with
    uses: ./.forgejo/workflows/android-release.yml would never fire here.
  • An API-created tag does fire push: tags:. Source-verified on v10.0.3:
    releaseservice.CreateNewTag → createTag() calls
    notify_service.PushCommits with RefFullName = refs/tags/<tag> and the
    Actions notifier turns that into a push event with that ref
    (services/release/release.go, services/actions/notifier.go), and
    matchPushEvent in modules/actions/workflows.go matches
    on.push.tags against the tag name of a tag-ref push. The event is not
    swallowed by the "do not trigger on the Actions user's own events" guard
    because the tag is created with the repo's FORGEJO_TOKEN PAT (sirius),
    not the Actions token.
  • The run history also shows the old branches: [main] push trigger on
    android-release.yml never fired once: 15 runs, all
    workflow_dispatch, including after the merge of PR #38/#44 which touched
    android/**. Do not add a trigger you have not seen fire — the tag push is
    the one this PR relies on, and the runs below are its evidence.

Evidence

(live run URLs, pasted as they finish)

  • dry run (dry_run=true):
  • real run (bump=minor):
  • release + asset sizes:

Diff

.forgejo/workflows/release.yml, .forgejo/workflows/android-release.yml,
docs/RELEASING.md (new), docs/README.md, README.md (release sentences
only). No src/**, crates/**, android/**, Cargo.toml, Cargo.lock; no
crate-version bump; no tags created by hand.

## Policy Releases become **manual and batched**. A merge publishes nothing. - `release.yml` loses `push: branches: [main]` and is now `workflow_dispatch` only. Inputs: `bump` (patch|minor|major, default **minor**), `version` (explicit `X.Y.Z`/`vX.Y.Z`, overrides `bump`), `tag` (rebuild an existing tag), `dry_run` (build + checksum, no tag, no publish). - Contradictory input is **rejected, not guessed at**: `tag` + `version` together, an unparseable `version`, or a `bump` outside patch|minor|major all fail in the `version` job with a message. - The fail-closed tag delete and the "refuse to move an existing tag" check are unchanged. - `android-release.yml` loses `push: branches: [main]` too, and gains `push: tags: ['v*.*.*']` so the APK + AAR still reach the release a manual dispatch creates (see below). - New `docs/RELEASING.md` documents the policy, the inputs, what the run does, the Android attachment, rebuilding a tag, and what the workflows do **not** gate on (no "CI green" check inside the release run — the operator checks it). ## Which push would previously have started a release Before this PR, `.forgejo/workflows/release.yml` had `on.push.branches: [main]` with `paths: src/**, crates/**, Cargo.toml, Cargo.lock, scripts/release-body.md`. So **any merge to `main` that touched `src/`, `crates/`, `Cargo.toml`, `Cargo.lock` or `scripts/release-body.md`** minted a tag and published both Linux binaries — e.g. PR #43 (SQLCipher store), #44 (Android Keystore), #45 (outbox), #46 (zeroize), #47, #48, #49, each of which produced a `v0.1.x` release today (v0.1.1 … v0.1.6). `android-release.yml` separately fired on **any merge to `main` touching `android/app/**`, `android/sdk/**`, `android/*.gradle.kts`, `android/gradle/**`, `android/gradle.properties`, `android/settings.gradle.kts`, `scripts/build-android-local.sh` or that workflow file**, i.e. a merge like PR #44 would have auto-published an APK/AAR. **Post-merge confirmation (for the maintainer to run, not claimed here):** after this lands, a push to `main` touching `src/**` (or `android/**`) must produce **no** `release` and **no** `android-release` run. Post-merge pushes to `main` are now the only way a release workflow could still be reached by a merge, and neither file has a `branches: [main]` trigger any more: ``` $ grep -n "push:" .forgejo/workflows/release.yml .forgejo/workflows/android-release.yml .forgejo/workflows/android-release.yml:24: push: ``` ## How the Android assets reach the release without a push trigger The card offered two options; this PR uses the decoupled one — `push: tags: ['v*.*.*']` — because the other one is not available on this instance: - **`workflow_call` is not supported here.** This Forgejo is `10.0.3+gitea-1.22.0` (`GET /api/v1/version`); reusable workflows only appear in the Forgejo docs from **v12** onward (v11's reference has no `workflow_call` section, v12's does), so a caller job with `uses: ./.forgejo/workflows/android-release.yml` would never fire here. - **An API-created tag does fire `push: tags:`.** Source-verified on v10.0.3: `releaseservice.CreateNewTag` → `createTag()` calls `notify_service.PushCommits` with `RefFullName = refs/tags/<tag>` and the Actions notifier turns that into a `push` event with that ref (`services/release/release.go`, `services/actions/notifier.go`), and `matchPushEvent` in `modules/actions/workflows.go` matches `on.push.tags` against the tag name of a tag-ref push. The event is not swallowed by the "do not trigger on the Actions user's own events" guard because the tag is created with the repo's `FORGEJO_TOKEN` PAT (`sirius`), not the Actions token. - The run history also shows the *old* `branches: [main]` push trigger on `android-release.yml` never fired once: 15 runs, **all** `workflow_dispatch`, including after the merge of PR #38/#44 which touched `android/**`. Do not add a trigger you have not seen fire — the tag push is the one this PR relies on, and the runs below are its evidence. ## Evidence (live run URLs, pasted as they finish) - dry run (`dry_run=true`): <pending> - real run (`bump=minor`): <pending> - release + asset sizes: <pending> ## Diff `.forgejo/workflows/release.yml`, `.forgejo/workflows/android-release.yml`, `docs/RELEASING.md` (new), `docs/README.md`, `README.md` (release sentences only). No `src/**`, `crates/**`, `android/**`, `Cargo.toml`, `Cargo.lock`; no crate-version bump; no tags created by hand.
ci(release): manual, batched releases — no release on merge
All checks were successful
ci / test (pull_request) Successful in 3m49s
6c9fd00b8a
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.
sirius merged commit 0c12abfa32 into main 2026-09-12 22:29:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!62
No description provided.