|
|
|
|
@@ -1,164 +1,71 @@
|
|
|
|
|
# Release Procedure
|
|
|
|
|
|
|
|
|
|
The [release policy](policy/release.md) owns versioning, compatibility,
|
|
|
|
|
publication completion, and immutability. This runbook supplies Scriptorium's
|
|
|
|
|
commands; release notes under `docs/releases/` are historical summaries. The
|
|
|
|
|
[OSS policy](policy/oss.md#discoverability) owns license and attribution
|
|
|
|
|
discoverability requirements.
|
|
|
|
|
publication completion, and immutability. This runbook gives Scriptorium's
|
|
|
|
|
local selections; [ReleaseKit v0.10.0][adoption] owns release mechanics.
|
|
|
|
|
|
|
|
|
|
## Prepare The Candidate
|
|
|
|
|
## Prepare
|
|
|
|
|
|
|
|
|
|
Use a POSIX shell, Git with a configured tagger identity and access to
|
|
|
|
|
`origin`, and the selected release toolchain, Go 1.27.4. The native host must
|
|
|
|
|
support Go's race detector and have its required C compiler. If Git is
|
|
|
|
|
configured to sign tags, its signing tool and key must be available. Run from the
|
|
|
|
|
repository root. The [developer guide](development.md#baseline-validation)
|
|
|
|
|
explains the separate Go consumer minimum; selecting a release toolchain does
|
|
|
|
|
not raise that minimum.
|
|
|
|
|
Use a POSIX shell, Git with a configured tagger identity, Go 1.27.4, and the
|
|
|
|
|
native race detector's C compiler prerequisites. If tags are signed, arrange
|
|
|
|
|
the signing tool and key. Work from the repository root on `main`; the
|
|
|
|
|
authoritative `origin` push endpoint is currently
|
|
|
|
|
`ssh://git@forge.maximumdirect.net:22222/eric/scriptorium.git`. The Go consumer
|
|
|
|
|
minimum is separate; see the [developer guide](development.md).
|
|
|
|
|
|
|
|
|
|
Install Go 1.27.4 from the [official downloads](https://go.dev/dl/) or an
|
|
|
|
|
equivalent package source before validation. Set `release_go_root` to its
|
|
|
|
|
installation directory, replacing the illustrative path below, and select it
|
|
|
|
|
in the release shell:
|
|
|
|
|
Select Go 1.27.4 and prepare public dependencies before offline validation:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
release_go_root=/path/to/go1.27.4
|
|
|
|
|
export PATH="$release_go_root/bin:$PATH"
|
|
|
|
|
export GOTOOLCHAIN=local
|
|
|
|
|
go version
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The version output should identify `go1.27.4`. Keep this selection and the
|
|
|
|
|
hosted workflow's Go image in step when deliberately updating the release
|
|
|
|
|
toolchain. Ordinary contributor checks may use another compatible toolchain.
|
|
|
|
|
|
|
|
|
|
Provision the module cache before offline validation; when dependencies are
|
|
|
|
|
not cached:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
GOWORK=off go mod download
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Choose an unused stable version under the release policy. Commit its note as
|
|
|
|
|
`docs/releases/<version>.md`, beginning with a title such as
|
|
|
|
|
`# Scriptorium v0.14.0` (an example, not an instruction to select that version).
|
|
|
|
|
Include a concise summary and relevant compatibility impact or upgrade action.
|
|
|
|
|
End the note with the following footer, replacing `<version>` in all three absolute
|
|
|
|
|
URLs with the selected version tag (for example, `v0.14.0`):
|
|
|
|
|
Choose an unused stable version and commit its note at
|
|
|
|
|
`docs/releases/<version>.md`, beginning with `# Scriptorium <version>`. Include
|
|
|
|
|
the relevant compatibility impact and upgrade actions. For the eventual
|
|
|
|
|
ReleaseKit adoption release, mention the new maintainer entry point and the
|
|
|
|
|
loss of separately injected revision metadata. End the note with immutable
|
|
|
|
|
links, substituting the chosen tag in all three locations:
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
[COPYRIGHT](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/docs/oss/attribution.md)
|
|
|
|
|
[COPYRIGHT](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/docs/oss/attribution.md)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Check that all three URLs name files in the candidate tree at that tag. The tag may
|
|
|
|
|
not resolve online until publication. The checked-in note is copied unchanged
|
|
|
|
|
into the hosted release body by the existing workflow, so do not maintain a
|
|
|
|
|
second footer there.
|
|
|
|
|
Update affected canonical documentation with the change, and retire completed
|
|
|
|
|
roadmap material when appropriate while preserving deferred work and links.
|
|
|
|
|
Publish the intended `main` commit to `origin` before publishing its tag.
|
|
|
|
|
The checked-in note supplies the complete hosted release body unchanged.
|
|
|
|
|
|
|
|
|
|
Finish and commit the intended candidate on `main`, then publish that branch:
|
|
|
|
|
## Publish And Deliver
|
|
|
|
|
|
|
|
|
|
From the module root, substitute the selected version:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git -c push.followTags=false push origin refs/heads/main:refs/heads/main
|
|
|
|
|
sh ./releasekit publish VERSION
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The publication command inspects the configured push endpoint of `origin`,
|
|
|
|
|
not a potentially stale remote-tracking ref. If a separate push URL is
|
|
|
|
|
configured, it is authoritative for both checks and publication. Configure one
|
|
|
|
|
publication URL; multiple push endpoints cannot be validated as one remote.
|
|
|
|
|
The module-selected tool uses [releasekit.json](../releasekit.json) for product,
|
|
|
|
|
race testing, Linux amd64/arm64 builds, and delivery selections. Native `check`
|
|
|
|
|
is an optional diagnostic, not a required step before `publish`. See the
|
|
|
|
|
[CLI][cli], [profile][profile], [build][build], and [publication and
|
|
|
|
|
reconciliation][publication] guides for command semantics and recovery.
|
|
|
|
|
|
|
|
|
|
## Publish
|
|
|
|
|
A successful tag push completes source publication; hosted delivery is
|
|
|
|
|
asynchronous and must be reported separately. The tag-triggered
|
|
|
|
|
[Woodpecker workflow](../.woodpecker/release.yml) delivers
|
|
|
|
|
`scriptorium-<version>-linux-amd64`, `scriptorium-<version>-linux-arm64`, and
|
|
|
|
|
`SHA256SUMS`. An operator must provision the Woodpecker repository secret
|
|
|
|
|
`releasekit_gitea_token`, mapped to `RELEASEKIT_GITEA_TOKEN`; source
|
|
|
|
|
publication itself needs no delivery token. Keep the earlier
|
|
|
|
|
`GITEA_RELEASE_TOKEN` secret for historical tagged workflows.
|
|
|
|
|
|
|
|
|
|
Invoke the single [publication command](../scripts/release.sh), substituting
|
|
|
|
|
the selected version:
|
|
|
|
|
For delivery retries and partial or unknown outcomes, follow the upstream
|
|
|
|
|
[delivery guide][delivery] and retain original build artifacts where rebuilding
|
|
|
|
|
could change bytes. Runtime version behavior is described by the
|
|
|
|
|
[runtime version guide][runtime].
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
sh scripts/release.sh v0.14.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The command validates a clean worktree and index on `main`, an unused local and
|
|
|
|
|
remote version, exact agreement with authoritative remote `main`, and a
|
|
|
|
|
checked-in note whose first-level title contains Scriptorium and the exact
|
|
|
|
|
version. Ignored local files do not make the candidate dirty.
|
|
|
|
|
|
|
|
|
|
The source-boundary guards reject committed workspaces, vendor trees, and
|
|
|
|
|
module replacements.
|
|
|
|
|
|
|
|
|
|
It then runs the complete suite once with the race detector and builds Linux
|
|
|
|
|
amd64 and arm64 binaries using `CGO_ENABLED=0`, `-trimpath`, and linker flags
|
|
|
|
|
`-s -w -X main.version=<version> -X main.revision=<candidate-commit>`.
|
|
|
|
|
The native test run uses the host platform and enables cgo.
|
|
|
|
|
Validation disables workspaces, uses read-only module mode, and disables module
|
|
|
|
|
and toolchain downloads. Missing dependencies must be provisioned separately;
|
|
|
|
|
fix the environment and rerun the command. No persistent validation cache is
|
|
|
|
|
maintained by the release tool.
|
|
|
|
|
|
|
|
|
|
The command rechecks candidate and publication state, creates an annotated tag
|
|
|
|
|
from the committed note, and pushes only that tag's exact object to its explicit
|
|
|
|
|
ref. It does not push branches, follow other tags, force updates, or wait for
|
|
|
|
|
CI. Temporary notes and validation builds are removed on exit. The successful
|
|
|
|
|
summary identifies the source commit and tag object and reports binary
|
|
|
|
|
delivery separately as asynchronous and unverified.
|
|
|
|
|
|
|
|
|
|
## Asynchronous Binary Delivery
|
|
|
|
|
|
|
|
|
|
The tag-triggered [hosted workflow](../.woodpecker/release.yml) builds and
|
|
|
|
|
publishes:
|
|
|
|
|
|
|
|
|
|
- `scriptorium-<version>-linux-amd64`;
|
|
|
|
|
- `scriptorium-<version>-linux-arm64`; and
|
|
|
|
|
- `SHA256SUMS`.
|
|
|
|
|
|
|
|
|
|
The matching checked-in note supplies the hosted release body. The workflow
|
|
|
|
|
owns image selection, packaging, checksum generation, and upload configuration.
|
|
|
|
|
Its binaries receive the tag and source commit as the same version/revision
|
|
|
|
|
metadata used by local candidate builds.
|
|
|
|
|
Its upload step skips existing files and does not overwrite the release.
|
|
|
|
|
Source-publication success does not attest to workflow success or asset
|
|
|
|
|
availability.
|
|
|
|
|
|
|
|
|
|
Workflow inspection, downloads, checksum verification, and a compatible-host
|
|
|
|
|
smoke test are optional delivery diagnostics. They must not delay or redefine
|
|
|
|
|
source-release completion. No polling or consumer-installation check is part
|
|
|
|
|
of the publication command.
|
|
|
|
|
|
|
|
|
|
## Failure Recovery
|
|
|
|
|
|
|
|
|
|
Before tag creation, correct and commit a failed candidate, publish `main`,
|
|
|
|
|
and invoke the publication command again. A changed candidate must pass its
|
|
|
|
|
own validation.
|
|
|
|
|
|
|
|
|
|
After an unsuccessful push, the command queries the authoritative endpoint.
|
|
|
|
|
If it confirms the exact tag object and candidate, it reports source success.
|
|
|
|
|
Otherwise it exits unsuccessfully and preserves the local tag. It never retries
|
|
|
|
|
a push or deletes a tag automatically. If the endpoint is unavailable, the
|
|
|
|
|
publication status is unknown, not evidence that nothing was published.
|
|
|
|
|
|
|
|
|
|
For manual diagnosis, select the affected version and compare the local tag
|
|
|
|
|
object and peeled commit with the authoritative remote:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
release_version=v0.14.0
|
|
|
|
|
release_remote=$(git remote get-url --push origin)
|
|
|
|
|
git rev-parse "refs/tags/$release_version" "refs/tags/$release_version^{commit}"
|
|
|
|
|
git ls-remote "$release_remote" refs/heads/main \
|
|
|
|
|
"refs/tags/$release_version" "refs/tags/$release_version^{}"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Do not retry while the outcome remains unknown. If the tag exists remotely,
|
|
|
|
|
do not move, recreate, or delete it. If the tag was never published or used by
|
|
|
|
|
any release channel, an explicitly authorized local cleanup may delete only
|
|
|
|
|
that unpublished tag; then rerun the command to validate and publish the
|
|
|
|
|
candidate. The command intentionally rejects an existing local tag rather than
|
|
|
|
|
assuming that a previous process validated it.
|
|
|
|
|
|
|
|
|
|
For transient delivery failures, inspect what has already been uploaded before
|
|
|
|
|
retrying the same immutable tag. The upload step's skip behavior alone does not
|
|
|
|
|
prove checksum consistency. Add missing assets only if they match the tagged
|
|
|
|
|
source and any already-published manifest, without replacing existing contents.
|
|
|
|
|
Compare rebuilt bytes with published checksums when recovering a partial
|
|
|
|
|
upload; do not assume toolchain changes reproduce identical binaries. If safe
|
|
|
|
|
completion is impossible, or published source, notes, packaging, or artifact
|
|
|
|
|
contents need correction, leave the original release intact and publish a new
|
|
|
|
|
version from a corrected commit.
|
|
|
|
|
[adoption]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/adoption.md
|
|
|
|
|
[cli]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/cli.md
|
|
|
|
|
[profile]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/config.md
|
|
|
|
|
[build]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/build.md
|
|
|
|
|
[publication]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/publish.md
|
|
|
|
|
[delivery]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/delivery.md
|
|
|
|
|
[runtime]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/runtime-version.md
|
|
|
|
|
|