Publishing a Go package to pkg.go.dev happens automatically when you tag a version in a public Git repository and push it. Ensure your repository has a valid go.mod file, then create a semantic version tag and push it to your remote.
git tag v1.0.0
git push origin v1.0.0
pkg.go.dev will detect the new tag and generate documentation within a few minutes.