3 homepage: https://goreleaser.com
5 goreleaser: Deliver Go binaries as fast and easily as possible
8 ### Updating `goreleaser`
10 `webi goreleaser@stable`
12 Use the `@beta` tag for pre-releases.
16 > `goreleaser` builds Go binaries for serveral platforms, creates a GitHub release
17 > and then pushes a Homebrew formula to a tap repository. All that wrapped in your
20 To create an example `.goreleaser.yaml` file, and test the configuration:
24 goreleaser --snapshot --skip-publish --rm-dist
27 You'll need to export a `GITHUB_TOKEN` or `GITLAB_TOKEN` environment variable, which should
28 contain a valid GitHub token with the `repo` scope or GitLab token with `api` scope. It will
29 be used to deploy releases to your GitHub/GitLab repository. You can create a token
30 [here](https://github.com/settings/tokens/new) for GitHub or
31 [here](https://gitlab.com/profile/personal_access_tokens) for GitLab.
34 export GITHUB_TOKEN="YOUR_GITHUB_TOKEN"
40 export GITLAB_TOKEN="YOUR_GITLAB_TOKEN"
43 GoReleaser will use the latest [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) of your
44 repository. Create a tag and push it to GitHub:
47 git tag -a v0.1.0 -m "First release"
48 git push origin v0.1.0
51 Now you can run GoReleaser at the root of your repository:
57 That's all! Check your GitHub/GitLab project's release page.
59 ### To cross-compile for Windows / Linux
62 brew install mingw-w64
63 brew install FiloSottile/musl-cross/musl-cross
67 GOARCH=amd64 GOOS=darwin go build -o unarr_darwin cmd/unarr/unarr.go
68 GOARCH=amd64 GOOS=windows CC=x86_64-w64-mingw32-gcc go build -o unarr.exe cmd/unarr/unarr.go
69 GOARCH=amd64 GOOS=linux CC=x86_64-linux-musl-gcc go build -o unarr_linux_amd64 cmd/unarr/unarr.go
72 The linux in question would need the musl libs installed to run a musl bin
75 sudo apt-get install -y musl
81 main: ./cmd/unarr/unarr.go
84 - CC=x86_64-linux-musl-gcc
87 - '-extldflags "-static"'