- Major Version Release Example:
v2.X.Y->v3.0.0- Bump the module name in
go.mod - Update the import paths in all non-
src/zdnspackages to use the new module name.
- Bump the module name in
Updating go.mod assuming releasing a new major version (v3):
module github.com/zmap/zdns/v2 // Update v2 -> v3
Update import paths in all non-src/zdns packages to use the new module name:
"github.com/zmap/zdns/v2/src/zdns" // Update v2 -> v3- All Releases
- Ensure all dependencies are up to date
go get -u ./... - Ensure that the ZDNS version src/zdns/version.go is updated to the new version
- Update the ZDNS version in the examples/*/go.mod
- Ensure any of the above changes have been merged into
main
- Ensure all dependencies are up to date
Once the above checklist is complete, you can proceed with the release process. We use goreleaser to automate the release process.
- Install
goreleaser:
brew install goreleaser/tap/goreleaser- Create a new tag and push to GH:
git tag -a vA.B.C -m "Release A.B.C"- Test the release:
goreleaser release --skip=publish --clean- Set GitHub Token (at least configured with
write:packages)
export GITHUB_TOKEN="YOUR_GH_TOKEN"- Push Tag to Github Be sure that this tagged commit is what you want to tag. Once you push you shouldn't delete the tagged version.
git push origin vA.B.C- Release!
goreleaser release --clean- Update the Release Notes with a description of your changes