.goreleaser.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # This is an example .goreleaser.yml file with some sensible defaults.
  2. # Make sure to check the documentation at https://goreleaser.com
  3. project_name: casaos
  4. before:
  5. hooks:
  6. - go generate
  7. - go run github.com/google/go-licenses@latest check . --disallowed_types=restricted
  8. - go mod tidy
  9. - go test -race -v ./...
  10. builds:
  11. - id: casaos-amd64
  12. binary: build/sysroot/usr/bin/casaos
  13. hooks:
  14. post:
  15. - upx --best --lzma -v --no-progress "{{ .Path }}"
  16. env:
  17. - CC=x86_64-linux-gnu-gcc
  18. ldflags:
  19. - -X main.commit={{.Commit}}
  20. - -X main.date={{.Date}}
  21. - -s
  22. - -w
  23. - -extldflags "-static"
  24. tags:
  25. - musl
  26. - netgo
  27. - osusergo
  28. goos:
  29. - linux
  30. goarch:
  31. - amd64
  32. - id: casaos-arm64
  33. binary: build/sysroot/usr/bin/casaos
  34. hooks:
  35. post:
  36. - upx --best --lzma -v --no-progress "{{ .Path }}"
  37. env:
  38. - CC=aarch64-linux-gnu-gcc
  39. ldflags:
  40. - -X main.commit={{.Commit}}
  41. - -X main.date={{.Date}}
  42. - -s
  43. - -w
  44. - -extldflags "-static"
  45. tags:
  46. - musl
  47. - netgo
  48. - osusergo
  49. goos:
  50. - linux
  51. goarch:
  52. - arm64
  53. - id: casaos-arm-7
  54. binary: build/sysroot/usr/bin/casaos
  55. hooks:
  56. post:
  57. - upx --best --lzma -v --no-progress "{{ .Path }}"
  58. env:
  59. - CC=arm-linux-gnueabihf-gcc
  60. ldflags:
  61. - -X main.commit={{.Commit}}
  62. - -X main.date={{.Date}}
  63. - -s
  64. - -w
  65. - -extldflags "-static"
  66. tags:
  67. - musl
  68. - netgo
  69. - osusergo
  70. goos:
  71. - linux
  72. goarch:
  73. - arm
  74. goarm:
  75. - "7"
  76. - id: casaos-migration-tool-amd64
  77. binary: build/sysroot/usr/bin/casaos-migration-tool
  78. hooks:
  79. post:
  80. - upx --best --lzma -v --no-progress "{{ .Path }}"
  81. main: ./cmd/migration-tool
  82. env:
  83. - CC=x86_64-linux-gnu-gcc
  84. ldflags:
  85. - -X main.commit={{.Commit}}
  86. - -X main.date={{.Date}}
  87. - -s
  88. - -w
  89. - -extldflags "-static"
  90. tags:
  91. - musl
  92. - netgo
  93. - osusergo
  94. goos:
  95. - linux
  96. goarch:
  97. - amd64
  98. - id: casaos-migration-tool-arm64
  99. binary: build/sysroot/usr/bin/casaos-migration-tool
  100. hooks:
  101. post:
  102. - upx --best --lzma -v --no-progress "{{ .Path }}"
  103. main: ./cmd/migration-tool
  104. env:
  105. - CC=aarch64-linux-gnu-gcc
  106. ldflags:
  107. - -X main.commit={{.Commit}}
  108. - -X main.date={{.Date}}
  109. - -s
  110. - -w
  111. - -extldflags "-static"
  112. tags:
  113. - musl
  114. - netgo
  115. - osusergo
  116. goos:
  117. - linux
  118. goarch:
  119. - arm64
  120. - id: casaos-migration-tool-arm-7
  121. binary: build/sysroot/usr/bin/casaos-migration-tool
  122. hooks:
  123. post:
  124. - upx --best --lzma -v --no-progress "{{ .Path }}"
  125. main: ./cmd/migration-tool
  126. env:
  127. - CC=arm-linux-gnueabihf-gcc
  128. ldflags:
  129. - -X main.commit={{.Commit}}
  130. - -X main.date={{.Date}}
  131. - -s
  132. - -w
  133. - -extldflags "-static"
  134. tags:
  135. - musl
  136. - netgo
  137. - osusergo
  138. goos:
  139. - linux
  140. goarch:
  141. - arm
  142. goarm:
  143. - "7"
  144. archives:
  145. - name_template: "{{ .Os }}-{{ .Arch }}-{{ .ProjectName }}-v{{ .Version }}"
  146. id: casaos
  147. builds:
  148. - casaos-amd64
  149. - casaos-arm64
  150. - casaos-arm-7
  151. replacements:
  152. arm: arm-7
  153. files:
  154. - build/**/*
  155. - name_template: "{{ .Os }}-{{ .Arch }}-{{ .ProjectName }}-migration-tool-v{{ .Version }}"
  156. id: casaos-migration-tool
  157. builds:
  158. - casaos-migration-tool-amd64
  159. - casaos-migration-tool-arm64
  160. - casaos-migration-tool-arm-7
  161. replacements:
  162. arm: arm-7
  163. files:
  164. - build/sysroot/etc/**/*
  165. checksum:
  166. name_template: "checksums.txt"
  167. snapshot:
  168. name_template: "{{ incpatch .Version }}"
  169. changelog:
  170. sort: asc
  171. filters:
  172. exclude:
  173. - "^docs:"
  174. - "^test:"
  175. # release:
  176. # github:
  177. # owner: IceWhaleTech
  178. # name: CasaOS
  179. # draft: true
  180. # prerelease: auto
  181. # mode: replace
  182. # name_template: "v{{ .Version }}"
  183. release:
  184. github:
  185. owner: IceWhaleTech
  186. name: CasaOS
  187. draft: true
  188. prerelease: auto
  189. mode: replace
  190. name_template: "v{{ .Version }}"