-
Establish intent: stable release or prerelease. If unclear, ask.
-
Inspect repo and release task:
pwd
git remote -v
lets help release
git status --short --branch
git fetch --tags --prune
git tag --sort=-v:refname | head -20
Completion: repo is lets-cli/lets; branch/sync/cleanliness are known; latest stable and RC tags are known. If not on master, not up to date with origin/master, or dirty, report it and stop unless the user explicitly continues.
-
Select a candidate version using the rules below.
-
Planning checkpoint: tell the user the discovered latest stable, relevant RCs, proposed version, release message, and exact lets release ... command. Ask for confirmation before tests or tagging.
-
Preflight after confirmation:
go test ./...
For stable releases, also verify docs/docs/changelog.md has [<version>] because lets release enforces it. Completion: tests and stable changelog check pass, or release stops.
-
Remote-changing checkpoint: ask explicit approval to run the exact command:
lets release <version> -m "Release <version>"
lets release <version>-rcN -m "Prerelease <version>-rcN"
-
After approval, run lets release ....
-
If gh is available and authenticated, wait for the Release workflow and verify the GitHub release:
gh run list --workflow Release --limit 3 --json databaseId,status,conclusion,headBranch,headSha,displayTitle,createdAt,url
gh run watch <run-id> --exit-status
gh release view v<version> --json tagName,isPrerelease,publishedAt,url,assets
If gh is unavailable or unauthenticated, report that verification was skipped.
-
Report tag, workflow result if checked, release URL if checked, and working tree status.