Create and publish module

Initialize a module, tag a version in git, and push the tag to publish your Go module.

Create a go.mod file with go mod init, tag a version in your version control system, and push the tag to your remote repository to publish the module.

  1. Initialize the module with your desired import path. go mod init example.com/my/module
  2. Tag the current commit with a semantic version number. git tag -a v1.0.0 -m "Release v1.0.0"
  3. Push the tag to the remote repository to make it available to the proxy. git push origin v1.0.0