.goreleaser.yml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. project_name: OliveTin
  2. version: 2
  3. before:
  4. hooks:
  5. - make service-prep
  6. - make windows-resources VERSION={{ .Version }}
  7. builds:
  8. # id defaults to project_name (OliveTin) — required for notarize.macos defaults.
  9. - skip: '{{ isEnvSet "GORELEASER_SKIP_BUILD" }}'
  10. env:
  11. - CGO_ENABLED=0
  12. binary: OliveTin
  13. main: .
  14. dir: service
  15. goos:
  16. - linux
  17. - darwin
  18. - freebsd
  19. goarch:
  20. - amd64
  21. - arm64
  22. - arm
  23. - riscv64
  24. goarm:
  25. - 5 # For old RPIs
  26. - 6
  27. - 7
  28. ignore:
  29. - goos: darwin
  30. goarch: arm # Mac does not work on [32bit] arm
  31. ldflags:
  32. - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{ .CommitDate }}
  33. # Built and archived for SignPath, but excluded from the GitHub release upload.
  34. - id: windows
  35. skip: '{{ isEnvSet "GORELEASER_SKIP_BUILD" }}'
  36. env:
  37. - CGO_ENABLED=0
  38. binary: OliveTin
  39. main: .
  40. dir: service
  41. goos:
  42. - windows
  43. goarch:
  44. - amd64
  45. ldflags:
  46. - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{ .CommitDate }}
  47. checksum:
  48. name_template: 'checksums.txt'
  49. # Exclude the windows archive; signed zip/MSI checksums are added after SignPath.
  50. ids:
  51. - default
  52. - openrc
  53. snapshot:
  54. version_template: "{{ .Branch }}-{{ .ShortCommit }}"
  55. changelog:
  56. sort: asc
  57. groups:
  58. - title: 'Security'
  59. regexp: '^.*?security(\([[:word:]]+\))??!?:.+$'
  60. order: 0
  61. - title: 'Features'
  62. regexp: '^.*?feat.*?(\([[:word:]]+\))??!?:.+$'
  63. order: 1
  64. - title: 'Bug fixes'
  65. regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
  66. order: 2
  67. - title: Others
  68. order: 999
  69. filters:
  70. exclude:
  71. - '^docs:'
  72. - '^test:'
  73. - '^cicd:'
  74. - '^chore:'
  75. - '^release:'
  76. - '^refactor:'
  77. - '^Merge branch'
  78. - '^Merge commit from fork'
  79. archives:
  80. - id: default
  81. ids:
  82. - OliveTin
  83. formats: tar.gz
  84. files:
  85. - config.yaml
  86. - LICENSE
  87. - README.md
  88. - src: Dockerfile.singlearch
  89. dst: Dockerfile
  90. - examples/backupScript.sh
  91. - webui
  92. - var
  93. name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ .Arm }}"
  94. wrap_in_directory: true
  95. - id: windows
  96. ids:
  97. - windows
  98. formats: zip
  99. files:
  100. - config.yaml
  101. - LICENSE
  102. - README.md
  103. - src: Dockerfile.singlearch
  104. dst: Dockerfile
  105. - examples/backupScript.sh
  106. - webui
  107. - var
  108. name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ .Arm }}"
  109. wrap_in_directory: true
  110. # dockers_v2: single multi-platform build with buildx; keeps default provenance + SBOM.
  111. # Replaces legacy dockers + docker_manifests (avoids "is a manifest list" when attestations are on).
  112. dockers_v2:
  113. - dockerfile: Dockerfile.multiarches
  114. images:
  115. - docker.io/jamesread/olivetin
  116. - ghcr.io/olivetin/olivetin
  117. tags:
  118. - "{{ .Tag }}"
  119. - latest
  120. - latest-3k
  121. platforms:
  122. - linux/amd64
  123. - linux/arm64
  124. extra_files:
  125. - webui/
  126. - var/entities/
  127. - config.yaml
  128. - var/helper-actions/
  129. - examples/backupScript.sh
  130. labels:
  131. org.opencontainers.image.revision: "{{ .FullCommit }}"
  132. org.opencontainers.image.version: "{{ .Tag }}"
  133. sbom: true
  134. nfpms:
  135. - id: default
  136. maintainer: James Read <contact@jread.com>
  137. description: OliveTin is a web interface for running Linux shell commands.
  138. homepage: https://github.com/OliveTin/OliveTin
  139. license: AGPL-3.0
  140. formats:
  141. - deb
  142. - rpm
  143. bindir: /usr/local/bin/
  144. file_name_template: '{{ .PackageName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
  145. contents:
  146. - src: var/systemd/OliveTin.service
  147. dst: /etc/systemd/system/OliveTin.service
  148. - src: webui/
  149. dst: /var/www/olivetin/
  150. type: tree
  151. - src: config.yaml
  152. dst: /etc/OliveTin/config.yaml
  153. type: "config|noreplace"
  154. - src: var/entities/*
  155. dst: /etc/OliveTin/entities/
  156. type: "config|noreplace"
  157. - src: var/manpage/OliveTin.1.gz
  158. dst: /usr/share/man/man1/OliveTin.1.gz
  159. - id: openrc
  160. maintainer: James Read <contact@jread.com>
  161. description: OliveTin is a web interface for running Linux shell commands.
  162. homepage: https://github.com/OliveTin/OliveTin
  163. license: AGPL-3.0
  164. formats:
  165. - apk
  166. bindir: /usr/local/bin/
  167. file_name_template: '{{ .PackageName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
  168. contents:
  169. - src: var/openrc/OliveTin
  170. dst: /etc/init.d/OliveTin
  171. # Avoid type: tree for apk — nfpm writes GNU base-256 modes for walked
  172. # dirs (ModeDir), which apk-tools rejects (#761 / goreleaser/nfpm#1112).
  173. - src: webui/index.html
  174. dst: /var/www/olivetin/index.html
  175. - src: webui/assets/*
  176. dst: /var/www/olivetin/assets/
  177. - src: config.yaml
  178. dst: /etc/OliveTin/config.yaml
  179. type: "config|noreplace"
  180. - src: var/entities/*
  181. dst: /etc/OliveTin/entities/
  182. type: "config|noreplace"
  183. - src: var/manpage/OliveTin.1.gz
  184. dst: /usr/share/man/man1/OliveTin.1.gz
  185. # Sign and notarize darwin binaries via quill (no macOS runner required).
  186. # Skipped when MACOS_SIGN_P12 is unset so local/snapshot builds stay unsigned.
  187. notarize:
  188. macos:
  189. - enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
  190. # Defaults to project_name when omitted; must match builds[].id (also project_name).
  191. sign:
  192. certificate: "{{.Env.MACOS_SIGN_P12}}"
  193. password: "{{.Env.MACOS_SIGN_PASSWORD}}"
  194. notarize:
  195. issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
  196. key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
  197. key: "{{.Env.MACOS_NOTARY_KEY}}"
  198. wait: true
  199. # Apple rejects notary auth tokens with lifetimes over 20m.
  200. timeout: 20m
  201. release:
  202. # Publish immediately without Windows assets; sign-windows uploads signed zip/MSI later.
  203. draft: false
  204. # semantic-release's github plugin creates a draft release first (for issue comments);
  205. # adopt it and replace its placeholder notes rather than creating a second release.
  206. use_existing_draft: true
  207. mode: replace
  208. ids:
  209. - default
  210. - openrc
  211. footer: |
  212. ## Container images (from GitHub)
  213. - `docker pull ghcr.io/olivetin/olivetin:{{ .Version }}`
  214. ## Container images ([on Docker Hub](https://hub.docker.com/r/jamesread/olivetin/tags?page=1&ordering=last_updated))
  215. - `docker pull docker.io/jamesread/olivetin:{{ .Version }}`
  216. ## Upgrade warnings, or breaking changes
  217. - No such issues between the last release and this version.
  218. ## Useful links
  219. - [Which download do I need?](https://docs.olivetin.app/install/choose_package.html)
  220. - [Ask for help and chat with others users in the Discord community](https://discord.gg/jhYWWpNJ3v)
  221. Thanks for your interest in OliveTin!