release: a -prerelease flag numbering X-pre.N from the tags #50

Merged
mikluko merged 1 commit from release-prerelease into main 2026-11-25 21:15:26 +00:00
Owner

Summary

changelog release -prerelease [-version X | -bump L]
  X = what release would take
  N = max N over tags vX-pre.N, plus 1; 1 with none
  emits version=X-pre.N, prerelease=true, notes of X
  writes nothing; refuses a shallow checkout, -open, -date, a pre-release X

actions/release gets a prerelease input passing the flag.

This repository's release.yaml gets a prerelease input. Because install.sh reads actions/VERSION and TestVersionMatchesTheChangelog holds it to the newest entry, a pre-release here is still a full release commit, folded as X-pre.N. That commit is pushed only as its tag, so main keeps the fragments. The release is published with prerelease: true and the major tag is not moved.

Evidence

  • go test ./... passes, including TestNextPrerelease and TestReleaseCmdPrerelease*: numbering, other spellings ignored, files untouched, shallow refused.
  • golangci-lint run: 0 issues. actionlint on .forgejo/workflows: clean.

Merge Danger

Door: two-way

Blast Radius: release workflow

The new path in release.yaml runs only on a dispatch with prerelease: true. The final path changes from git commit -am to an explicit git add of the same three paths.

Closes #49

🤖 Generated with Claude Code

## Summary ```text changelog release -prerelease [-version X | -bump L] X = what release would take N = max N over tags vX-pre.N, plus 1; 1 with none emits version=X-pre.N, prerelease=true, notes of X writes nothing; refuses a shallow checkout, -open, -date, a pre-release X ``` `actions/release` gets a `prerelease` input passing the flag. This repository's `release.yaml` gets a `prerelease` input. Because `install.sh` reads `actions/VERSION` and `TestVersionMatchesTheChangelog` holds it to the newest entry, a pre-release here is still a full release commit, folded as `X-pre.N`. That commit is pushed **only as its tag**, so main keeps the fragments. The release is published with `prerelease: true` and the major tag is not moved. ## Evidence - `go test ./...` passes, including `TestNextPrerelease` and `TestReleaseCmdPrerelease*`: numbering, other spellings ignored, files untouched, shallow refused. - `golangci-lint run`: 0 issues. `actionlint` on `.forgejo/workflows`: clean. ## Merge Danger **Door:** two-way **Blast Radius:** release workflow The new path in `release.yaml` runs only on a dispatch with `prerelease: true`. The final path changes from `git commit -am` to an explicit `git add` of the same three paths. Closes #49 🤖 Generated with [Claude Code](https://claude.com/claude-code)
release: a -prerelease flag numbering X-pre.N from the tags
All checks were successful
CI / test (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 31s
f77e4b17d3
A workflow can cut a pre-release without a commit on main: the version is
the one the notes call for, the number one above the vX-pre.N tags, and the
files stay as they are for the final release to fold.

This repository's own release workflow takes a prerelease input. Its
pre-release still needs a release commit, since install.sh reads
actions/VERSION and TestVersionMatchesTheChangelog holds it to the newest
entry, so that commit is pushed only as the tag and the major tag stays.

Closes #49

Assisted-By: Claude <noreply@anthropic.com>
mikluko deleted branch release-prerelease 2026-11-25 21:15:26 +00:00
Sign in to join this conversation.
No description provided.