Skip to content

Commit

Permalink
build: Add go-releaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
jhelison committed Dec 31, 2023
1 parent 2ac6b49 commit edcdef5
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Don't forget to use conventional comments and write a good Pull Request 😊
<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE.txt` for more information.
Distributed under the MIT License. See `LICENSE` for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
94 changes: 94 additions & 0 deletions goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit edcdef5

Please # to comment.