This document is the runbook for cutting a go-redis release. It is intended for maintainers with write/tag access to the repository.
For the format and style of the release notes themselves, see .github/RELEASE_NOTES_TEMPLATE.md.
go-redis follows Semantic Versioning:
- Patch (
vX.Y.Z+1) — bug fixes, no API changes. - Minor (
vX.Y+1.0) — backwards-compatible new features, deprecations. - Major (
vX+1.0.0) — breaking changes. Coordinate with the team first.
Pre-releases use vX.Y.Z-beta.N / vX.Y.Z-rc.N.
- Target branch is
masterand CI is green on the latest commit. - All PRs intended for this release are merged.
- There are no open issues in the release milestone (if used).
-
CHANGELOG/ release notes have been considered; dependabot-only and doc-only changes are excluded per the template. - Confirm the next version number and decide if it's a patch / minor / major.
- Open the draft release auto-generated by release-drafter on GitHub.
- Prepend a new section to
RELEASE-NOTES.mdusing.github/RELEASE_NOTES_TEMPLATE.mdas the format. Keep the file in chronological order (newest first). - Pick 3–5 Highlights — the most user-facing, impactful changes.
- Remove dependabot bumps and doc-only typo fixes from the lists.
- Verify every PR has a contributor attribution and link.
- Open a PR with just the release-notes change if you want review before bumping versions, otherwise include it in the release PR below.
Create a release branch from master:
git checkout master && git pull --ff-only
git checkout -b release/vX.Y.ZRun the release script on that branch:
TAG=vX.Y.Z ./scripts/release.shWhat the script does (and explicitly does not do):
- ✅ Validates
TAGmatches the semver regex and isn't already a git tag. - ✅ Rewrites every
redis/go-redis*line in every sub-modulego.modto point at the newTAG. Trailing// indirectmarkers are preserved. - ✅ Runs
go mod tidy -compat=1.24in each sub-module. - ✅ Updates the return value in
version.go. - ❌ Does not switch branches (runs in your current branch).
- ❌ Does not require a clean working tree (so you can mix it with release-notes edits in the same branch).
- ❌ Does not commit, tag, or push anything.
Review and commit the changes yourself:
git diff # sanity-check the bumps
git add -u
git commit -m "chore: release vX.Y.Z"
git push origin release/vX.Y.ZThen on GitHub:
- Open a PR from
release/vX.Y.Zintomaster. - Wait for all required CI checks (build, golangci-lint, spellcheck, doctests, e2e where applicable) to pass.
- Get at least one maintainer approval.
- Merge the PR (use a merge commit — the tag will point at the merge SHA).
After the release PR is merged, pull the latest master and dry-run the
tagger:
git checkout master && git pull --ff-only
TAG=vX.Y.Z ./scripts/tag.sh vX.Y.ZThe script defaults to dry-run and prints the commands it would run.
Verify the output, then apply for real with -t:
./scripts/tag.sh vX.Y.Z -tThis creates and pushes:
- The top-level tag
vX.Y.Z. - A per-module tag
<module>/vX.Y.Zfor each public sub-module (skippingexample/*andinternal/*).
- On GitHub, open the draft release created by release-drafter.
- Set the tag to
vX.Y.Zand the target tomaster. - Replace the auto-generated body with the curated notes from
RELEASE-NOTES.mdfor this version. - For pre-releases, check "Set as a pre-release".
- Publish.
- Verify the release appears on pkg.go.dev within a few minutes (trigger a fetch by visiting the version URL if needed).
- Announce on Discord (see the link in
CONTRIBUTING.md). - Close the release milestone if one was used.
- Open follow-up issues for anything deferred from this release.
For an urgent fix on top of the latest release:
- Branch from the latest release tag:
git checkout -b hotfix/vX.Y.Z+1 vX.Y.Z. - Cherry-pick (or re-apply) only the required fix commits.
- Follow the normal release flow above with
TAG=vX.Y.Z+1. - Make sure the fix is also present on
master(forward-port if necessary).
release.shfails with "tag already exists" — the tag has already been created. Pick the next version, or delete the local tag first if it was created by mistake.tag.shreports version mismatch in ago.mod— a sub-module was not updated byrelease.sh. Fix thego.modmanually (or re-runrelease.sh), amend the release PR, and re-run the tagger.version.godoes not contain the tag —release.shdid not run or the bump was reverted. Re-runrelease.shon the release branch.- pkg.go.dev does not show the new version — visit
https://pkg.go.dev/github.com/redis/go-redis/v9@vX.Y.Zonce to trigger a fetch from the module proxy.