version: 2 # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com before: hooks: # You may remove this if you don't use go modules. - go mod tidy # you may remove this if you don't need go generate # - go generate ./... builds: - id: gost env: - CGO_ENABLED=0 main: ./cmd/gost targets: - darwin_amd64 - darwin_arm64 - linux_386 - linux_amd64 - linux_amd64_v3 - linux_arm_5 - linux_arm_6 - linux_arm_7 - linux_arm64 - linux_mips_softfloat - linux_mips_hardfloat - linux_mipsle_softfloat - linux_mipsle_hardfloat - linux_mips64 - linux_mips64le - linux_s390x - linux_riscv64 - linux_loong64 - freebsd_386 - freebsd_amd64 - windows_386 - windows_amd64 - windows_amd64_v3 - windows_arm64 - android_arm64 ldflags: - "-s -w -X 'main.version={{ .Tag }}'" - id: gost-packages env: - CGO_ENABLED=0 main: ./cmd/gost targets: - linux_amd64 - linux_amd64_v3 - linux_arm64 ldflags: - "-s -w -X 'main.version={{ .Tag }}'" upx: - # UPX compression. Disabled by default (see #863): upx --best/--lzma/--brute # adds ~3s startup time on low-spec systems (linux/arm). Release builds can # opt in via GORELEASER_UPX=true environment variable. enabled: false archives: - ids: - gost formats: - tar.gz builds_info: group: root owner: root # use zip for windows archives format_overrides: - goos: windows formats: - zip nfpms: - id: packages package_name: gost ids: - gost-packages vendor: go-gost homepage: https://gost.run/ maintainer: go-gost contributors description: GO Simple Tunnel license: MIT formats: - deb - rpm bindir: /usr/bin contents: - src: gost.service dst: /usr/lib/systemd/system/gost.service - src: README.md dst: /usr/share/doc/gost/README.md - src: README_en.md dst: /usr/share/doc/gost/README_en.md - src: LICENSE dst: /usr/share/doc/gost/LICENSE - src: gost.yml dst: /usr/share/doc/gost/examples/gost.yml - dst: /etc/gost type: dir file_info: mode: 0755 checksum: name_template: 'checksums.txt' snapshot: version_template: "{{ incpatch .Version }}-next" changelog: sort: asc filters: exclude: - '^docs:' - '^test:' release: prerelease: auto mode: keep-existing # The lines beneath this are called `modelines`. See `:help modeline` # Feel free to remove those if you don't want/use them. # yaml-language-server: $schema=https://goreleaser.com/static/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj