-
Notifications
You must be signed in to change notification settings - Fork 17
Goreleaser: mini tutorial
Neil O'Toole edited this page Mar 18, 2020
·
2 revisions
This page explains how to add various goreleaser publishing steps to a bare-bones project.
For background, see the brew docs.
In this case, we want to be able to install neilotoole/sqlitr via brew.
First, create a new repository neilotoole/homebrew-sqlitr.
Then, add the following to .goreleaser.yml:
brews:
-
homepage: "https://github.com/neilotoole/sqlitr"
description: "sqlitr is a trivial Go/CGo SQLite CLI"
github:
owner: neilotoole
name: homebrew-sqlitrPush changes to git, and tag (e.g. git tag v0.1.2 && git push origin v0.1.2). Then execute ./goreleaser-release.sh. This will build everything, push a release to GitHub, and push a formula sqlitr.rb to neilotoole/homebrew-sqlitr.
Then (on macOS):
$ brew tap neilotoole/sqlitr && brew install sqlitr
$ which sqlitr # verify you're not accidentally using the $GOPATH/bin sqlitr
/usr/local/bin/sqlitr
$ sqlitr --version
sqlitr 0.1.2 2020-03-11T11:22:48Z 7114890b5f7532143286362f6426063743fa502cAdd the following to .goreleaser.yml:
scoop:
bucket:
owner: neilotoole
name: sqlitr
homepage: "https://github.com/neilotoole/sqlitr"
description: "sqlitr is a trivial Go/CGo SQLite CLI"As above with brew, push to git, tag, and ./goreleaser-release.sh. This will add sqlitr.json to neilotole/sqlitr.
Then (on Windows):
$ scoop bucket add sqlitr https://github.com/neilotoole/sqlitr
$ scoop install sqlitrSee the wiki page for snapcraft.