ci(release): manual, batched releases — no release on every merge #62
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_95e0d607"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Policy
Releases become manual and batched. A merge publishes nothing.
release.ymllosespush: branches: [main]and is nowworkflow_dispatchonly. Inputs:
bump(patch|minor|major, default minor),version(explicit
X.Y.Z/vX.Y.Z, overridesbump),tag(rebuild an existingtag),
dry_run(build + checksum, no tag, no publish).tag+versiontogether, an unparseable
version, or abumpoutside patch|minor|majorall fail in the
versionjob with a message.unchanged.
android-release.ymllosespush: branches: [main]too, and gainspush: tags: ['v*.*.*']so the APK + AAR still reach the release a manualdispatch creates (see below).
docs/RELEASING.mddocuments 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.ymlhadon.push.branches: [main]withpaths: src/**, crates/**, Cargo.toml, Cargo.lock, scripts/release-body.md. So any merge tomainthat touchedsrc/,crates/,Cargo.toml,Cargo.lockorscripts/release-body.mdminted 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.xrelease today (v0.1.1 … v0.1.6).android-release.ymlseparately fired on any merge tomaintouchingandroid/app/**,android/sdk/**,android/*.gradle.kts,android/gradle/**,android/gradle.properties,android/settings.gradle.kts,scripts/build-android-local.shor that workflow file, i.e. a merge likePR #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
maintouchingsrc/**(orandroid/**) must produceno
releaseand noandroid-releaserun. Post-merge pushes tomainare now the only way a release workflow could still be reached by a merge, and
neither file has a
branches: [main]trigger any more: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 thisinstance:
workflow_callis not supported here. This Forgejo is10.0.3+gitea-1.22.0(GET /api/v1/version); reusable workflows only appearin the Forgejo docs from v12 onward (v11's reference has no
workflow_callsection, v12's does), so a caller job withuses: ./.forgejo/workflows/android-release.ymlwould never fire here.push: tags:. Source-verified on v10.0.3:releaseservice.CreateNewTag→createTag()callsnotify_service.PushCommitswithRefFullName = refs/tags/<tag>and theActions notifier turns that into a
pushevent with that ref(
services/release/release.go,services/actions/notifier.go), andmatchPushEventinmodules/actions/workflows.gomatcheson.push.tagsagainst the tag name of a tag-ref push. The event is notswallowed by the "do not trigger on the Actions user's own events" guard
because the tag is created with the repo's
FORGEJO_TOKENPAT (sirius),not the Actions token.
branches: [main]push trigger onandroid-release.ymlnever fired once: 15 runs, allworkflow_dispatch, including after the merge of PR #38/#44 which touchedandroid/**. Do not add a trigger you have not seen fire — the tag push isthe one this PR relies on, and the runs below are its evidence.
Evidence
(live run URLs, pasted as they finish)
dry_run=true):bump=minor):Diff
.forgejo/workflows/release.yml,.forgejo/workflows/android-release.yml,docs/RELEASING.md(new),docs/README.md,README.md(release sentencesonly). No
src/**,crates/**,android/**,Cargo.toml,Cargo.lock; nocrate-version bump; no tags created by hand.