2026-07-28 02:20:39 +00:00
# Release Procedure
2026-10-08 16:40:34 +00:00
This runbook implements the [release policy ](policy/release.md ). Promptkit
2026-11-02 14:24:04 +00:00
publishes source-only Go module tags from `main` to `origin` , followed by a
page-only Gitea release. Successful publication of the intended tag, with its
source commit available on `main` , completes the source release. Report hosted
delivery separately. Do not wait for CI or Go module availability.
2026-07-28 02:20:39 +00:00
2026-09-23 16:06:33 +00:00
## Prepare The Candidate
2026-07-28 02:20:39 +00:00
2026-09-23 16:06:33 +00:00
Required tools are Git, Go with race-detector support, POSIX shell, and Python
2026-10-08 16:40:34 +00:00
3. Work from the repository root with push access to `origin` .
2026-07-28 02:20:39 +00:00
2026-11-02 14:24:04 +00:00
Use the latest Go installation available locally for the release tool and its
child commands. Put it first on `PATH` and keep it selected throughout:
2026-10-08 13:35:06 +00:00
```sh
export GOTOOLCHAIN=local
go version
2026-10-09 03:45:39 +00:00
```
2026-11-02 14:24:04 +00:00
For a minor release, normally advance the consumer minimum to the initial
stable patch of that Go series:
2026-10-09 03:45:39 +00:00
```sh
2026-10-08 13:35:06 +00:00
release_go_version=$(go env GOVERSION)
2026-10-08 16:14:50 +00:00
release_go_series=${release_go_version#go }
release_go_series=${release_go_series%.*}
go mod edit "-go=${release_go_series}.0"
2026-10-08 13:35:06 +00:00
```
2026-11-02 14:24:04 +00:00
Retain a higher patch minimum when required by a dependency or identified fix.
For a patch release, preserve the existing minimum. Explain minimum increases
under the [versioning policy ](policy/release.md#versioning-and-compatibility ).
Prepare dependency caches before committing the candidate:
2026-10-08 16:14:50 +00:00
2026-10-08 16:40:34 +00:00
```sh
2026-11-02 14:24:04 +00:00
go mod download
2026-10-08 16:40:34 +00:00
```
2026-07-28 02:20:39 +00:00
2026-10-08 16:40:34 +00:00
Choose an unused stable version and create `docs/releases/<version>.md` with a
title containing `Promptkit` and that exact version, a short summary, and any
2026-11-02 14:24:04 +00:00
compatibility impact or upgrade instructions. End the note with:
2026-09-26 21:44:52 +00:00
```markdown
2026-11-02 14:10:37 +00:00
[COPYRIGHT ](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/vX.Y.Z/COPYRIGHT ) | [LICENSE ](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/vX.Y.Z/LICENSE ) | [ATTRIBUTION ](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/vX.Y.Z/docs/oss/attribution.md )
2026-09-26 21:44:52 +00:00
```
2026-11-02 14:24:04 +00:00
Substitute the selected version and check the paths against the candidate;
future tag URLs need not resolve during preparation. Follow the
[OSS policy ](policy/oss.md ). Historical notes and tags remain unchanged.
2026-08-26 15:06:33 +00:00
2026-11-02 14:24:04 +00:00
Supply delivery credentials through `RELEASEKIT_GITEA_TOKEN` or the ignored
local file `.releasekit/gitea-token` , with owner-only file permissions. A
nonblank environment value takes precedence. Source publication neither reads
nor requires this token. The [profile ](../releasekit.json ) selects the token
path for committed-file protection; keep credentials out of commits and logs.
2026-10-08 16:23:26 +00:00
2026-11-02 14:24:04 +00:00
Retire completed roadmaps, preserve unfinished work, and repair affected links.
Review and commit the candidate on `main` , including any module updates, then
push `main` to `origin` before publishing its tag.
2026-10-08 16:23:26 +00:00
2026-11-02 14:24:04 +00:00
## Validate And Publish
2026-07-28 02:20:39 +00:00
```sh
2026-09-23 16:06:33 +00:00
./scripts/release.sh vMAJOR.MINOR.PATCH
2026-07-28 02:20:39 +00:00
```
2026-11-02 14:24:04 +00:00
The launcher uses `go tool` to build or reuse the module-selected ReleaseKit
executable in Go's cache, using the selected local toolchain. ReleaseKit runs
the [profile's checks ](../releasekit.json ) once, verifies publication state, and
publishes only the intended tag. Preserve its native exit status and diagnostic.
Successful publication needs no separate remote read-back or CI wait.
For optional local diagnosis, use `./scripts/releasekit.sh check VERSION` .
It is not a required step before publication. The upstream
2026-11-03 00:49:47 +00:00
[candidate-check guide ](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.8.0/docs/consumers/check.md )
and [CLI contract ](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.8.0/docs/cli.md )
2026-11-02 14:24:04 +00:00
own shared checks and exit-status definitions.
2026-07-28 19:31:32 +00:00
2026-11-02 14:10:37 +00:00
## Deliver The Hosted Release
2026-11-02 14:24:04 +00:00
After source publication, keep a clean checkout at the published tag's commit:
2026-11-02 14:10:37 +00:00
```sh
./scripts/releasekit.sh deliver vMAJOR.MINOR.PATCH
```
2026-11-02 14:24:04 +00:00
The profile selects page-only Gitea delivery for this repository. The hosted
body is the complete checked-in note, including its licensing footer. There are
no binary assets, checksum manifests, candidate revalidation, or CI waits.
ReleaseKit checks delivery credentials during delivery, not as a publication
gate. Report the hosted URL on success; delivery failure leaves the source
release complete.
2026-11-02 14:10:37 +00:00
For a later retry, use a clean checkout of the original tag with its recorded
2026-11-02 14:24:04 +00:00
module files and supply the token there. In a separate checkout, for example:
2026-11-02 14:10:37 +00:00
```sh
git switch --detach vMAJOR.MINOR.PATCH
./scripts/releasekit.sh deliver vMAJOR.MINOR.PATCH
```
2026-11-02 14:24:04 +00:00
Resolve uncertain hosted writes before retrying the same immutable version.
Matching content is accepted; conflicts are not overwritten. Do not rerun
`publish` or move tags to repair delivery. Follow the upstream
2026-11-03 00:49:47 +00:00
[delivery guide ](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.8.0/docs/consumers/delivery.md )
2026-11-02 14:24:04 +00:00
for result interpretation and recovery. These commands apply to tags containing
2026-11-02 14:10:37 +00:00
this delivery configuration; older releases retain their original workflows.
2026-09-23 16:06:33 +00:00
## Failure Recovery
2026-07-28 02:20:39 +00:00
2026-11-02 14:24:04 +00:00
For source-publication failures, use ReleaseKit's status and diagnostic to
distinguish a candidate defect from a publication conflict. Correct and commit
candidate defects, push `main` , and rerun publication as appropriate. A failure
after local tag creation may leave a ref even when its object ID is unavailable.
2026-07-28 02:20:39 +00:00
2026-11-03 00:49:47 +00:00
Status 3 means the push outcome remains unknown. Do not retry or remove the local
tag until the authoritative outcome is resolved. ReleaseKit attempts to save
private publication evidence and reports a record path or a separate recording
warning. A recording failure does not change the publication outcome.
Use the recovery command reported for that attempt, or discover local records
and explicitly select the matching attempt:
2026-07-28 19:31:32 +00:00
```sh
2026-11-03 00:49:47 +00:00
./scripts/releasekit.sh publication-attempts
./scripts/releasekit.sh reconcile --record /absolute/path/to/selected-record.json
2026-07-28 19:31:32 +00:00
```
2026-11-03 00:49:47 +00:00
Discovery is local; reconciliation observes the original destination without
rerunning validation, changing tags, or delivering hosted content. Neither is
a routine gate after successful publication. Follow the upstream
[recovery procedure ](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.8.0/docs/release.md#resolve-publication-failures )
for outcomes, incomplete evidence, and older attempts without records.
Records are stored under Git's common directory by default and can contain
credential-bearing endpoints. Keep them private, out of source control and
shared logs; retain them while needed for recovery and remove them when that
value expires. See the [evidence guide ](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.8.0/docs/consumers/publish.md#retain-and-reconcile-publication-evidence )
for storage and retention details.
Current absence does not prove a version was never published. Remove a retained
local tag only after establishing absence and confirming it was not already
published or used by another release channel. Never reuse a known published
version or replace a published tag or hosted page. Corrections require a new
appropriate version.