Skip to content

Instantly share code, notes, and snippets.

@bobby569
Last active August 9, 2023 19:23
Show Gist options
  • Select an option

  • Save bobby569/ff7eb0eb3a38539a8b74adac65a93ab2 to your computer and use it in GitHub Desktop.

Select an option

Save bobby569/ff7eb0eb3a38539a8b74adac65a93ab2 to your computer and use it in GitHub Desktop.
Publish release for OSS golang projects

This gist provides guidence to publish release using goreleaser for OSS golang projects that either not offer desired packages by any means or not release as frequent as desired.

Pre-requisite

Steps

  1. Fork the golang repo to your own repository
  2. Clone the repo
  3. Add the .goreleaser.yaml file. You can do this through goreleaser init
  4. Commit the change and tag the commit with a version: git add . && git commit -m "..." && git tag -a v... -m "..."
  5. Push the commit and tag to the remote branch: git push origin main && git push origin v...
  6. Set up a fine-grained token. Grant read and write permission to codebase/content. Note the token.
    • Your profile -> Setting -> Developer Settings -> Personal Acess Token -> Generate new token
  7. In terminal, run export GITHUB_TOKEN="..."
  8. Then run goreleaser release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment