sing-box/.goreleaser.yaml

188 lines
4.9 KiB
YAML
Raw Normal View History

2022-08-12 14:53:46 +00:00
project_name: sing-box
builds:
2022-12-11 06:38:01 +00:00
- id: main
main: ./cmd/sing-box
2022-08-12 14:53:46 +00:00
flags:
- -v
- -trimpath
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
2023-03-09 08:53:25 +00:00
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
2022-08-12 14:53:46 +00:00
tags:
2022-09-15 04:20:38 +00:00
- with_gvisor
2022-08-12 14:53:46 +00:00
- with_quic
2023-06-13 14:46:04 +00:00
- with_dhcp
2022-08-21 05:03:19 +00:00
- with_wireguard
2023-08-29 11:43:41 +00:00
- with_ech
2022-11-21 07:25:49 +00:00
- with_utls
- with_reality_server
2023-11-13 06:12:22 +00:00
- with_acme
2022-08-21 05:03:19 +00:00
- with_clash_api
2022-08-12 14:53:46 +00:00
env:
- CGO_ENABLED=0
targets:
2023-11-13 14:58:53 +00:00
- linux_386
2022-08-12 14:53:46 +00:00
- linux_amd64_v1
- linux_amd64_v3
- linux_arm64
- linux_arm_7
- linux_s390x
- linux_riscv64
2022-08-12 14:53:46 +00:00
- windows_amd64_v1
- windows_amd64_v3
- windows_386
- windows_arm64
- darwin_amd64_v1
- darwin_amd64_v3
- darwin_arm64
mod_timestamp: '{{ .CommitTimestamp }}'
- id: legacy
main: ./cmd/sing-box
flags:
- -v
- -trimpath
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_reality_server
2023-11-13 06:12:22 +00:00
- with_acme
- with_clash_api
env:
- CGO_ENABLED=0
- GOROOT=/nix/store/kg6i737jjqs923jcijnm003h68c1dghj-go-1.20.11/share/go
gobinary: /nix/store/kg6i737jjqs923jcijnm003h68c1dghj-go-1.20.11/bin/go
targets:
- windows_amd64_v1
- windows_386
- darwin_amd64_v1
mod_timestamp: '{{ .CommitTimestamp }}'
2022-12-11 06:38:01 +00:00
- id: android
main: ./cmd/sing-box
flags:
- -v
- -trimpath
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
2023-03-09 08:53:25 +00:00
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
2022-12-11 06:38:01 +00:00
tags:
- with_gvisor
- with_quic
2023-06-13 14:46:04 +00:00
- with_dhcp
2022-12-11 06:38:01 +00:00
- with_wireguard
2023-08-29 11:43:41 +00:00
- with_ech
2022-12-11 06:38:01 +00:00
- with_utls
2023-11-13 06:12:22 +00:00
- with_reality_server
- with_acme
2022-12-11 06:38:01 +00:00
- with_clash_api
env:
- CGO_ENABLED=1
overrides:
- goos: android
goarch: arm
goarm: 7
env:
- CC=armv7a-linux-androideabi19-clang
- CXX=armv7a-linux-androideabi19-clang++
- goos: android
goarch: arm64
env:
- CC=aarch64-linux-android21-clang
- CXX=aarch64-linux-android21-clang++
- goos: android
goarch: 386
env:
2022-12-11 07:01:54 +00:00
- CC=i686-linux-android19-clang
- CXX=i686-linux-android19-clang++
2022-12-11 06:38:01 +00:00
- goos: android
goarch: amd64
goamd64: v1
env:
- CC=x86_64-linux-android21-clang
- CXX=x86_64-linux-android21-clang++
targets:
- android_arm_7
- android_arm64
- android_386
- android_amd64
mod_timestamp: '{{ .CommitTimestamp }}'
2022-08-12 14:53:46 +00:00
snapshot:
name_template: "{{ .Version }}.{{ .ShortCommit }}"
archives:
- id: archive
builds:
- main
- android
2022-08-12 14:53:46 +00:00
format: tar.gz
format_overrides:
- goos: windows
format: zip
wrap_in_directory: true
files:
- LICENSE
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: archive-legacy
builds:
- legacy
format: tar.gz
format_overrides:
- goos: windows
format: zip
wrap_in_directory: true
files:
- LICENSE
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-legacy'
2022-08-12 14:53:46 +00:00
nfpms:
- id: package
package_name: sing-box
file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
vendor: sagernet
homepage: https://sing-box.sagernet.org/
maintainer: nekohasekai <contact-git@sekai.icu>
description: The universal proxy platform.
license: GPLv3 or later
formats:
- deb
- rpm
- archlinux
2022-08-12 14:53:46 +00:00
priority: extra
contents:
- src: release/config/config.json
dst: /etc/sing-box/config.json
type: config
- src: release/config/sing-box.service
dst: /etc/systemd/system/sing-box.service
- src: release/config/sing-box@.service
dst: /etc/systemd/system/sing-box@.service
- src: LICENSE
dst: /usr/share/licenses/sing-box/LICENSE
source:
2022-08-21 05:03:19 +00:00
enabled: false
2022-08-12 14:53:46 +00:00
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
checksum:
2022-08-21 05:03:19 +00:00
disable: true
2022-08-12 14:53:46 +00:00
name_template: '{{ .ProjectName }}-{{ .Version }}.checksum'
signs:
- artifacts: checksum
release:
github:
owner: SagerNet
name: sing-box
name_template: '{{ if .IsSnapshot }}{{ nightly }}{{ else }}{{ .Version }}{{ end }}'
draft: true
mode: replace