.goreleaser.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. project_name: sing-box
  2. builds:
  3. - id: main
  4. main: ./cmd/sing-box
  5. flags:
  6. - -v
  7. - -trimpath
  8. asmflags:
  9. - all=-trimpath={{.Env.GOPATH}}
  10. gcflags:
  11. - all=-trimpath={{.Env.GOPATH}}
  12. ldflags:
  13. - -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
  14. tags:
  15. - with_gvisor
  16. - with_quic
  17. - with_dhcp
  18. - with_wireguard
  19. - with_ech
  20. - with_utls
  21. - with_reality_server
  22. - with_clash_api
  23. env:
  24. - CGO_ENABLED=0
  25. targets:
  26. - linux_amd64_v1
  27. - linux_amd64_v3
  28. - linux_arm64
  29. - linux_arm_7
  30. - linux_s390x
  31. - windows_amd64_v1
  32. - windows_amd64_v3
  33. - windows_386
  34. - windows_arm64
  35. - darwin_amd64_v1
  36. - darwin_amd64_v3
  37. - darwin_arm64
  38. mod_timestamp: '{{ .CommitTimestamp }}'
  39. - id: android
  40. main: ./cmd/sing-box
  41. flags:
  42. - -v
  43. - -trimpath
  44. asmflags:
  45. - all=-trimpath={{.Env.GOPATH}}
  46. gcflags:
  47. - all=-trimpath={{.Env.GOPATH}}
  48. ldflags:
  49. - -X github.com/sagernet/sing-box/constant.Version={{ .Version }} -s -w -buildid=
  50. tags:
  51. - with_gvisor
  52. - with_quic
  53. - with_dhcp
  54. - with_wireguard
  55. - with_ech
  56. - with_utls
  57. - with_clash_api
  58. env:
  59. - CGO_ENABLED=1
  60. overrides:
  61. - goos: android
  62. goarch: arm
  63. goarm: 7
  64. env:
  65. - CC=armv7a-linux-androideabi19-clang
  66. - CXX=armv7a-linux-androideabi19-clang++
  67. - goos: android
  68. goarch: arm64
  69. env:
  70. - CC=aarch64-linux-android21-clang
  71. - CXX=aarch64-linux-android21-clang++
  72. - goos: android
  73. goarch: 386
  74. env:
  75. - CC=i686-linux-android19-clang
  76. - CXX=i686-linux-android19-clang++
  77. - goos: android
  78. goarch: amd64
  79. goamd64: v1
  80. env:
  81. - CC=x86_64-linux-android21-clang
  82. - CXX=x86_64-linux-android21-clang++
  83. targets:
  84. - android_arm_7
  85. - android_arm64
  86. - android_386
  87. - android_amd64
  88. mod_timestamp: '{{ .CommitTimestamp }}'
  89. snapshot:
  90. name_template: "{{ .Version }}.{{ .ShortCommit }}"
  91. archives:
  92. - id: archive
  93. format: tar.gz
  94. format_overrides:
  95. - goos: windows
  96. format: zip
  97. wrap_in_directory: true
  98. files:
  99. - LICENSE
  100. name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
  101. nfpms:
  102. - id: package
  103. package_name: sing-box
  104. file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
  105. vendor: sagernet
  106. homepage: https://sing-box.sagernet.org/
  107. maintainer: nekohasekai <[email protected]>
  108. description: The universal proxy platform.
  109. license: GPLv3 or later
  110. formats:
  111. - deb
  112. - rpm
  113. priority: extra
  114. contents:
  115. - src: release/config/config.json
  116. dst: /etc/sing-box/config.json
  117. type: config
  118. - src: release/config/sing-box.service
  119. dst: /etc/systemd/system/sing-box.service
  120. - src: release/config/[email protected]
  121. dst: /etc/systemd/system/[email protected]
  122. - src: LICENSE
  123. dst: /usr/share/licenses/sing-box/LICENSE
  124. source:
  125. enabled: false
  126. name_template: '{{ .ProjectName }}-{{ .Version }}.source'
  127. prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
  128. checksum:
  129. disable: true
  130. name_template: '{{ .ProjectName }}-{{ .Version }}.checksum'
  131. signs:
  132. - artifacts: checksum
  133. release:
  134. github:
  135. owner: SagerNet
  136. name: sing-box
  137. name_template: '{{ if .IsSnapshot }}{{ nightly }}{{ else }}{{ .Version }}{{ end }}'
  138. draft: true
  139. mode: replace