From edcdef54eb89f923114a1f9d2cb65f38dd8ab3d3 Mon Sep 17 00:00:00 2001 From: Jhelison Uchoa Date: Sun, 31 Dec 2023 17:33:55 -0300 Subject: [PATCH] build: Add go-releaser config --- README.md | 2 +- goreleaser.yaml | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 goreleaser.yaml diff --git a/README.md b/README.md index c1c6a8e..32648c8 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ Don't forget to use conventional comments and write a good Pull Request 😊 ## License -Distributed under the MIT License. See `LICENSE.txt` for more information. +Distributed under the MIT License. See `LICENSE` for more information.

(back to top)

diff --git a/goreleaser.yaml b/goreleaser.yaml new file mode 100644 index 0000000..b847722 --- /dev/null +++ b/goreleaser.yaml @@ -0,0 +1,94 @@ +before: + hooks: + - go mod download + +builds: + - id: "go-torrent-darwin" + main: ./main.go + binary: bin/go-torrent + env: + - CGO_ENABLED=1 + - CC=o64-clang + - CXX=o64-clang++ + goos: + - darwin + goarch: + - amd64 + flags: + - -tags=cgo + - id: "go-torrent-darwin-arm64" + main: ./main.go + binary: bin/go-torrent + env: + - CGO_ENABLED=1 + - CC=oa64-clang + - CXX=oa64-clang++ + goos: + - darwin + goarch: + - arm64 + flags: + - -tags=cgo + - id: "go-torrent-linux" + main: ./main.go + binary: bin/go-torrent + env: + - CGO_ENABLED=1 + - CC=gcc + - CXX=g++ + goos: + - linux + goarch: + - amd64 + flags: + - -tags=cgo + - id: "go-torrent-linux-arm64" + main: ./main.go + binary: bin/go-torrent + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + goos: + - linux + goarch: + - arm64 + flags: + - -tags=cgo + - id: "go-torrent-windows" + main: ./main.go + binary: bin/go-torrent + env: + - CGO_ENABLED=1 + - CC=x86_64-w64-mingw32-gcc + - CXX=x86_64-w64-mingw32-g++ + goos: + - windows + goarch: + - amd64 + flags: + - -tags=cgo + - -buildmode=exe + +archives: + - name_template: '{{ .ProjectName }}_{{ .Version }}_{{- title .Os }}_{{ .Arch }}' + format_overrides: + - goos: windows + format: zip + builds: + - go-torrent-darwin + - go-torrent-darwin-arm64 + - go-torrent-windows + - go-torrent-linux + - go-torrent-linux-arm64 + +checksum: + name_template: 'checksums.txt' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +snapshot: + name_template: "{{ .Tag }}-next" \ No newline at end of file