From 448e81a872b586296ed7d327eaa13af7836d6418 Mon Sep 17 00:00:00 2001 From: Raj Nakarja Date: Thu, 13 Aug 2026 12:15:24 +0200 Subject: [PATCH] Make the release path explicit and single-pass --- .github/workflows/ci.yml | 4 ---- CLAUDE.md | 2 +- README.md | 27 ++++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59d4d39..a0b7c4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,10 +51,6 @@ jobs: exit 1 fi - - run: go vet ./... - - - run: go test ./... - - name: Build the release the same way a tag would uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 with: diff --git a/CLAUDE.md b/CLAUDE.md index 9e58b0b..1c3bd2c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -90,7 +90,7 @@ General and meant to be reused verbatim across projects. ## Development cycle One request, one branch, one pull request, and the branch never outlives it. -Raj owns steps 1, 5 and 7; the rest happen here. +Raj owns steps 1, 5, 7 and 8; the rest happen here. 1. **Raj asks for something.** A cycle starts from a request, never from picking up where the last one stopped. diff --git a/README.md b/README.md index ac57944..c50cf44 100644 --- a/README.md +++ b/README.md @@ -111,12 +111,33 @@ Do everything below once. ## Releasing -1. Change `version` in `main.go`, then open and merge a release pull request. +1. Create `dev` fresh from `main`: -1. Tag the commit that merging created: + ```sh + git fetch origin + git switch -C dev origin/main + ``` + +1. Change `version` in `main.go`, run the checks, commit, and push: + + ```sh + CGO_ENABLED=0 go vet ./... + CGO_ENABLED=0 go test ./... + git diff --check + git add main.go + git commit -m "Version " + git push -u origin dev + ``` + +1. Open the `dev` pull request, review it, and merge it with squash. + +1. Return to `main`, remove the stale branch, and tag the commit that merging + created: ```sh - git switch main && git pull + git switch main + git pull --ff-only + git branch -D dev tag="v$(sed -n 's/^const version = "\(.*\)"$/\1/p' main.go)" git tag "$tag" && git push origin "$tag" ```