Align release policy and maintainer workflow with ReleaseKit

This commit is contained in:
2026-11-23 19:21:22 +00:00
parent 5a3db96588
commit dc9f429bb8
5 changed files with 91 additions and 108 deletions

View File

@@ -1,110 +1,84 @@
# Source Releases
# Releases
This is the executable runbook for [Release Policy](policy/release.md).
Notarius publishes an immutable lightweight tag and its checked-in release note,
not binaries or Gitea release objects. Linux is supported; macOS is best-effort
for development, and Windows is unsupported. `main` on `origin` is authoritative.
This runbook implements the [release policy](policy/release.md). Source
publication and hosted delivery are separate outcomes. The primary branch is
`main`; `origin` is authoritative.
## Prepare
Use Git, a POSIX shell, and a Go installation supporting toolchain selection.
The selected release toolchain is Go 1.27.0. Select it for candidate validation
and release builds, including any CI performing those tasks:
Use Git, a POSIX shell, Go 1.27.0, Git access to `origin`, and ordinary access
to private modules. The consumer minimum remains in [go.mod](../go.mod). Prepare
the selected toolchain and dependencies separately from offline validation:
```sh
export GOTOOLCHAIN=go1.27.0
go version
```
The consumer minimum is declared in [`go.mod`](../go.mod). Its patch-level
minimum is required by the selected ConfigKit dependency. Selecting a newer
release toolchain is a separate runbook update and leaves that minimum unchanged.
Configure ordinary Git credentials for `origin` and private-module access
without putting secrets in the repository. Prepare the selected toolchain and
dependencies before offline validation where necessary:
```sh
GOWORK=off GOPRIVATE=gitea.maximumdirect.net,go.maximumdirect.net go mod download
GOWORK=off go mod download
```
Choose an unused stable version under the policy's compatibility rules. Add
`docs/releases/<version>.md`, starting with `# Notarius <version>`, with a concise
summary and relevant compatibility/upgrade information. No fixed section list is
required. Update current documentation with behavior changes; retire only
completed roadmaps and preserve planned/deferred work. Commit the candidate on
`main` after ordinary change review. There is no separate release sign-off.
End each new release note with this footer, replacing `<version>` with the
selected tag. Check that `COPYRIGHT`, `LICENSE`, and `docs/oss/attribution.md`
exist in the candidate source before publication; the future tag need not
resolve remotely during preparation.
`docs/releases/<version>.md` beginning with `# Notarius <version>`, a concise
summary, and any compatibility or upgrade guidance. Update current documentation
and review the candidate normally. End the note with the following footer,
replacing `<version>` with the selected tag. Check the three paths in the
candidate; the future tag need not resolve yet.
```markdown
[COPYRIGHT](https://gitea.maximumdirect.net/eric/notarius/src/tag/<version>/COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/notarius/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/notarius/src/tag/<version>/docs/oss/attribution.md)
[COPYRIGHT](https://forge.maximumdirect.net/eric/notarius/src/tag/<version>/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/notarius/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/notarius/src/tag/<version>/docs/oss/attribution.md)
```
## Publish
Run one command from the repository with the actual selected version:
Commit the candidate on `main`, then publish the branch before invoking
ReleaseKit:
```sh
./scripts/release.sh vMAJOR.MINOR.PATCH
git push origin main
```
Both release scripts inherit the `GOTOOLCHAIN` selected during preparation.
The publication command checks version availability on `origin`, branch and
worktree state, and the matching note. It runs the complete offline default test
suite once and a native CLI build/version check with `GOWORK=off`. The
[gate rationale](policy/release.md#notarius-gate-selection) explains the selected
checks. It then rechecks candidate and publication state, pushes the exact
candidate to `main` without force, creates a lightweight tag, and pushes only
that tag. It neither rewrites history nor publishes other local tags.
## Publish and deliver
A successful tag push completes the source release. The command does not wait
for CI or verify consumer installation/module availability. Tag CI is advisory
validation only; there are no asynchronous deliverables to await.
## Failure And Recovery
Before publication, correct failed checks, commit any changes, and rerun the
command. If the candidate changes during validation, validation must run again
on the new candidate. A failed branch push publishes no tag.
On a failed or ambiguous push, the command queries the affected remote ref. If
a tag push reports failure but the intended lightweight tag is confirmed on the
remote, publication succeeded. Otherwise it stops and reports failure or unknown
status, leaving any local tag intact for inspection. Do not blindly rerun, force
push, or delete a possibly published tag.
Inspect authoritative state before retrying:
From the clean candidate on `main`, run:
```sh
git ls-remote origin refs/heads/main refs/tags/vMAJOR.MINOR.PATCH
git rev-parse vMAJOR.MINOR.PATCH
./scripts/releasekit publish vMAJOR.MINOR.PATCH
```
If the intended tag exists remotely, leave it immutable. If it is absent and
you have confirmed that the local tag was never published or used by a release
channel, remove only that unpublished local tag, then rerun the command. A
failed remote query is not proof of absence. Network/authentication failures
alone do not require a new version. A defect requiring changes to published
source requires a new semantically appropriate version and matching note.
ReleaseKit validates the candidate once, checks the selected Linux/amd64 build
and native version, and publishes the annotated tag. A confirmed tag publication
completes the source release; it does not wait for delivery. The optional
`./scripts/releasekit check VERSION` is a diagnostic, not a mandatory
preliminary repetition.
## Optional Diagnostics
Tag CI uses the committed profile to deliver the note and binary/checksum assets.
Provision Woodpecker secret `releasekit_gitea_token` and its Git/module access
before relying on this route. Alternatively, from a clean checkout of the
matching tag with dependencies prepared, run:
`./scripts/check-release-source.sh <version>` runs validation without publication.
It is useful for diagnosis, but is not a required preliminary step that must
repeat the publication command's checks.
```sh
./scripts/releasekit deliver vMAJOR.MINOR.PATCH
```
Race tests, vet, module hygiene, formatting, example checks, and cross-builds may
be run when relevant to a change; they are not additional release gates. The
development guide and testing policy govern change-specific verification.
Use one delivery route as appropriate, not both routinely. Local delivery uses
the ignored `.releasekit/gitea-token` file or a nonblank
`RELEASEKIT_GITEA_TOKEN` environment override. Keep the file owner-only and
never display its contents. Git publication uses Git credentials, not this token.
See the [delivery guide](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/delivery.md)
for credential setup and delivery details.
A fresh source install or exact-tag checkout/build may be used to investigate
consumer availability after release. Such checks are optional and do not delay
or reverse release completion. `notarius version` is diagnostic; subprocess
compatibility is defined by the [CLI report](cli.md#completion-report) and
[domain artifact contracts](integrations/json-output.md). The
[native migration guide](consumers/native-migration.md) describes the command
and configuration cutover; it does not prepare or authorize a release.
## Recovery
Report source publication and hosted delivery separately. Correct and commit a
failed candidate before retrying publication. For failed or ambiguous source
publication, use ReleaseKit's saved-record discovery and reconciliation guidance
in the [publication guide](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/publish.md)
before retrying; do not move a possibly published tag.
Delivery failure does not undo source publication. Investigate uncertainty or
conflicts before retrying against the same immutable tag. When retrying must
preserve the original asset bytes, retain native build output and its receipt and
follow the [delivery retry guidance](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/delivery.md).
Do not overwrite published content or republish source to repair delivery.
The selected upstream [CLI](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/cli.md)
and [profile reference](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/config.md)
own command and configuration details. Change-specific vet, race, link, or
other checks are not additional publication gates.