-> `goreleaser` makes it easy to build versioned Go binaries for Mac, Linux, Windows, and
-> Raspberry Pi, and to publish the ChangeLog and binaries to common release platforms
-> including GitHub, Gitea, Gitlab, and Homebrew.
+> `goreleaser` makes it easy to build versioned Go binaries for Mac, Linux,
+> Windows, and Raspberry Pi, and to publish the ChangeLog and binaries to common
+> release platforms including GitHub, Gitea, Gitlab, and Homebrew.
- `--skip-publish` will NOT publish to GitHub, etc
- `--rm-dist` will automatically remove the `./dist/` directory
- `--skip-publish` will NOT publish to GitHub, etc
- `--rm-dist` will automatically remove the `./dist/` directory
if len(os.Args) >= 2 && "version" == strings.TrimPrefix(os.Args[1]) {
fmt.Printf("YOUR_CLI_NAME v%s %s (%s)\n", version, commit[:7], date)
}
if len(os.Args) >= 2 && "version" == strings.TrimPrefix(os.Args[1]) {
fmt.Printf("YOUR_CLI_NAME v%s %s (%s)\n", version, commit[:7], date)
}
-Or place the token in `~/.config/goreleaser/github_token.txt` and update `.goreleaser.yml` accordingly:
+Or place the token in the default config location:
+
+```bash
+~/.config/goreleaser/github_token
+```
+
+You can also set `env_files` in `.goreleaser.yml`:
-[Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
-of your repository. Create a tag and push it to Git:
+[Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) of your repository.
+Create a tag and push it to Git:
-Check the console output to make sure that there are no messages about a failed publish. \
-If all is well you should the git tag on the releases page updated with a ChangeLog and the published binaries.
+Check the console output to make sure that there are no messages about a failed
+publish. \
+If all is well you should the git tag on the releases page updated with a ChangeLog
+and the published binaries.
- RPi 4 is ARM 64, also known as `aarch64`, `arm64`, and `armv8`.
- RPi 3 could run `armv7` and `arm64`.
- RPi 2, RPi Zero, and RPi can run either `armv6` or `armv7`.
- RPi 4 is ARM 64, also known as `aarch64`, `arm64`, and `armv8`.
- RPi 3 could run `armv7` and `arm64`.
- RPi 2, RPi Zero, and RPi can run either `armv6` or `armv7`.
-Some programs include C libraries, especially SQLite3 or 7z, and require integration with C libraries.
+Some programs include C libraries, especially SQLite3 or 7z, and require
+integration with C libraries.
-If you have simple instructions for how to set up cross-compiling from Windows or Linux, please let us know.
+If you have simple instructions for how to set up cross-compiling from Windows
+or Linux, please let us know.
- - id: unarr-linux-x64
- main: ./cmd/unarr/unarr.go
- env:
- - CGO_ENABLED=1
- - CC=x86_64-linux-musl-gcc
- flags:
- - "-ldflags"
- - '-extldflags "-static"'
- goos:
- - linux
- goarch:
- - amd64
- - id: unarr-linux-aarch64
- main: ./cmd/unarr/unarr.go
- env:
- - CGO_ENABLED=1
- - CC=aarch64-linux-musl-gcc
- flags:
- - "-ldflags"
- - '-extldflags "-static"'
- goos:
- - linux
- goarch:
- - arm64
- - id: unarr-linux-armv7
- main: ./cmd/unarr/unarr.go
- env:
- - CGO_ENABLED=1
- - CC=arm-linux-musleabi-gcc
- flags:
- - "-ldflags"
- - '-extldflags "-static"'
- goos:
- - linux
- goarch:
- - arm
- goarm:
- - 7
- - id: unarr-windows-x64
- main: ./cmd/unarr/unarr.go
- env:
- - CGO_ENABLED=1
- - CC=x86_64-w64-mingw32-gcc
- flags:
- - "-ldflags"
- - '-extldflags "-static"'
- goos:
- - linux
- goarch:
- - amd64
+ - id: unarr-linux-x64
+ main: ./cmd/unarr/unarr.go
+ env:
+ - CGO_ENABLED=1
+ - CC=x86_64-linux-musl-gcc
+ flags:
+ - '-ldflags'
+ - '-extldflags "-static"'
+ goos:
+ - linux
+ goarch:
+ - amd64
+ - id: unarr-linux-aarch64
+ main: ./cmd/unarr/unarr.go
+ env:
+ - CGO_ENABLED=1
+ - CC=aarch64-linux-musl-gcc
+ flags:
+ - '-ldflags'
+ - '-extldflags "-static"'
+ goos:
+ - linux
+ goarch:
+ - arm64
+ - id: unarr-linux-armv7
+ main: ./cmd/unarr/unarr.go
+ env:
+ - CGO_ENABLED=1
+ - CC=arm-linux-musleabi-gcc
+ flags:
+ - '-ldflags'
+ - '-extldflags "-static"'
+ goos:
+ - linux
+ goarch:
+ - arm
+ goarm:
+ - 7
+ - id: unarr-windows-x64
+ main: ./cmd/unarr/unarr.go
+ env:
+ - CGO_ENABLED=1
+ - CC=x86_64-w64-mingw32-gcc
+ flags:
+ - '-ldflags'
+ - '-extldflags "-static"'
+ goos:
+ - linux
+ goarch:
+ - amd64