This document describes the steps to release a new version of PublicSuffix for Go.
- You have commit access to the repository
- You have push access to the repository
- You have a GPG key configured for signing tags
-
Determine the new version using Semantic Versioning
VERSION=X.Y.Z
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality additions
- PATCH version for backwards-compatible bug fixes
-
Update the version constant with the new version
Edit
publicsuffix/publicsuffix.goand update theVersionconstant:const ( // Version identifies the current library version. // This is a pro forma convention given that Go dependencies // tends to be fetched directly from the repo. Version = "X.Y.Z" ... )
-
Update the changelog with the new version
Edit
CHANGELOG.mdand add a new section for the release following the Common Changelog format (see CONTRIBUTING.md for details):## X.Y.Z - YYYY-MM-DD ### Changed - Description of changes
-
Update dependencies
go get -u ./... go mod tidy
-
Run tests and confirm they pass
make testor
go test ./... -v -
Commit the new version
git commit -am "Release $VERSION" -
Create a signed tag
git tag -a v$VERSION -s -m "Release $VERSION"
-
Push the changes and tag
git push origin main git push origin v$VERSION
- Verify the new version appears on GitHub releases
- Verify the new version is available via
go get github.com/weppos/publicsuffix-go@v$VERSION - Update pkg.go.dev (usually updates automatically)
- Announce the release if necessary
- Go modules use git tags for versioning, so pushing the tag is what makes the new version available
- Unlike Ruby gems, there is no separate "publish" step - the tag itself publishes the version
- Go uses the
vprefix for version tags (e.g.,v1.0.0)