Publishing to Pkgsite
Publish your public-facing Fern Go SDK to pkg.go.dev. After following the steps on this page, you’ll have a versioned package published on pkg.go.dev.

fern
folder on
your local machine. See Set up the fern
folder for more
details.Set up your GitHub integration
- Create a new GitHub repository called
company-go
(or something similar) for your SDK, if you haven’t done so already. Make sure your repository has:- Public visibility
- An approved license (e.g. MIT, Apache)
- Install the Fern GitHub App: Select Configure, then scroll down to Repository Access. Select Only select repositories and in the dropdown select the repository for your SDK. Click Save.
Configure generators.yml
Run fern add <generator>
Navigate to your generators.yml
on your local machine. Your generators.yml
lives inside of your fern
folder and contains all the configuration for your Fern generators.
Add a new generator to generators.yml
:
Once the command completes, you’ll see a new group created in your generators.yml
:
Publish to pkg.go.dev
At this point, you’re ready to generate a release for your SDK.
Generate your release
Regenerate your SDK and publish it on pkg.go.dev:
Local machine output will verify that the release is pushed to your repository and tagged with the version you specified.
Publish on pkg.go.dev
Navigate to https://pkg.go.dev/github.com/<github-org>/<github-repo-name>/
and send a request to index your package. In a few minutes, your new release should be published to https://pkg.go.dev/!
After releasing a new version, it may take a few minutes for pkg.go.dev
to index and display the update. You can also try checking to see if the Go
proxy has indexed your module at
https://proxy.golang.org/github.com/<github-org>/<github-repo-name>/@v/list
. pkg.go.dev
indexing usually happens within 5-15 min of the proxy picking it up.
For more information, see Go’s documentation on Adding a package.