.goreleaser.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. # Documentation: https://goreleaser.com/customization/
  2. # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
  3. project_name: step-ca
  4. version: 2
  5. variables:
  6. packageName: step-ca
  7. packageRelease: 1 # Manually update release: in the nfpm section to match this value if you change this
  8. before:
  9. hooks:
  10. # You may remove this if you don't use go modules.
  11. - go mod download
  12. after:
  13. hooks:
  14. # This script depends on IS_PRERELEASE env being set. This is set by CI in the Is Pre-release step.
  15. - cmd: bash scripts/package-repo-import.sh {{ .Var.packageName }} {{ .Version }}
  16. output: true
  17. builds:
  18. -
  19. id: step-ca
  20. env:
  21. - CGO_ENABLED=0
  22. targets:
  23. - darwin_amd64
  24. - darwin_arm64
  25. - freebsd_amd64
  26. - linux_386
  27. - linux_amd64
  28. - linux_arm64
  29. - linux_arm_5
  30. - linux_arm_6
  31. - linux_arm_7
  32. - windows_amd64
  33. flags:
  34. - -trimpath
  35. main: ./cmd/step-ca/main.go
  36. binary: step-ca
  37. ldflags:
  38. - -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
  39. archives:
  40. - &ARCHIVE
  41. # Can be used to change the archive formats for specific GOOSs.
  42. # Most common use case is to archive as zip on Windows.
  43. # Default is empty.
  44. name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  45. format_overrides:
  46. - goos: windows
  47. format: zip
  48. files:
  49. - README.md
  50. - LICENSE
  51. allow_different_binary_count: true
  52. -
  53. << : *ARCHIVE
  54. id: unversioned
  55. name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  56. wrap_in_directory: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  57. nfpms:
  58. # Configure nFPM for .deb and .rpm releases
  59. #
  60. # See https://nfpm.goreleaser.com/configuration/
  61. # and https://goreleaser.com/customization/nfpm/
  62. #
  63. # Useful tools for debugging .debs:
  64. # List file contents: dpkg -c dist/step_...deb
  65. # Package metadata: dpkg --info dist/step_....deb
  66. #
  67. - &NFPM
  68. id: packages
  69. builds:
  70. - step-ca
  71. package_name: "{{ .Var.packageName }}"
  72. release: "1"
  73. file_name_template: >-
  74. {{- trimsuffix .ConventionalFileName .ConventionalExtension -}}
  75. {{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}}
  76. {{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}}
  77. {{- .ConventionalExtension -}}
  78. vendor: Smallstep Labs
  79. homepage: https://github.com/smallstep/certificates
  80. maintainer: Smallstep <techadmin@smallstep.com>
  81. description: >
  82. step-ca is an online certificate authority for secure, automated certificate management.
  83. license: Apache 2.0
  84. section: utils
  85. formats:
  86. - deb
  87. - rpm
  88. priority: optional
  89. bindir: /usr/bin
  90. contents:
  91. - src: debian/copyright
  92. dst: /usr/share/doc/step-ca/copyright
  93. rpm:
  94. signature:
  95. key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
  96. deb:
  97. signature:
  98. key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
  99. type: origin
  100. -
  101. << : *NFPM
  102. id: unversioned
  103. file_name_template: "{{ .PackageName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  104. source:
  105. enabled: true
  106. name_template: '{{ .ProjectName }}_{{ .Version }}'
  107. checksum:
  108. name_template: 'checksums.txt'
  109. extra_files:
  110. - glob: ./.releases/*
  111. signs:
  112. - cmd: cosign
  113. signature: "${artifact}.sig"
  114. certificate: "${artifact}.pem"
  115. args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}", "--yes"]
  116. artifacts: all
  117. publishers:
  118. - name: Google Cloud Artifact Registry
  119. ids:
  120. - packages
  121. cmd: ./scripts/package-upload.sh {{ abs .ArtifactPath }} {{ .Var.packageName }} {{ .Version }} {{ .Var.packageRelease }}
  122. snapshot:
  123. name_template: "{{ .Tag }}-next"
  124. release:
  125. # Repo in which the release will be created.
  126. # Default is extracted from the origin remote URL or empty if its private hosted.
  127. # Note: it can only be one: either github, gitlab or gitea
  128. github:
  129. owner: smallstep
  130. name: certificates
  131. # IDs of the archives to use.
  132. # Defaults to all.
  133. #ids:
  134. # - foo
  135. # - bar
  136. # If set to true, will not auto-publish the release.
  137. # Default is false.
  138. draft: false
  139. # If set to auto, will mark the release as not ready for production
  140. # in case there is an indicator for this in the tag e.g. v1.0.0-rc1
  141. # If set to true, will mark the release as not ready for production.
  142. # Default is false.
  143. prerelease: auto
  144. # You can change the name of the release.
  145. # Default is `{{.Tag}}`
  146. name_template: "Step CA {{ .Tag }} ({{ .Env.RELEASE_DATE }})"
  147. # Header template for the release body.
  148. # Defaults to empty.
  149. header: |
  150. ## Official Release Artifacts
  151. #### Linux
  152. - 📦 [step-ca_linux_{{ .Version }}_amd64.tar.gz](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_linux_{{ .Version }}_amd64.tar.gz)
  153. - 📦 [step-ca_{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}_amd64.deb](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}_amd64.deb)
  154. - 📦 [step-ca-{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}.x86_64.rpm](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca-{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}.x86_64.rpm)
  155. - 📦 [step-ca_{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}_arm64.deb](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}_arm64.deb)
  156. - 📦 [step-ca-{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}.aarch64.rpm](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca-{{ replace .Version "-" "." }}-{{ .Var.packageRelease }}.aarch64.rpm)
  157. #### OSX Darwin
  158. - 📦 [step-ca_darwin_{{ .Version }}_amd64.tar.gz](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_darwin_{{ .Version }}_amd64.tar.gz)
  159. - 📦 [step-ca_darwin_{{ .Version }}_arm64.tar.gz](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_darwin_{{ .Version }}_arm64.tar.gz)
  160. #### Windows
  161. - 📦 [step-ca_windows_{{ .Version }}_amd64.zip](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_windows_{{ .Version }}_amd64.zip)
  162. For more builds across platforms and architectures, see the `Assets` section below.
  163. And for packaged versions (Docker, k8s, Homebrew), see our [installation docs](https://smallstep.com/docs/step-ca/installation).
  164. Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/certificates/issues/new/choose).
  165. ## Signatures and Checksums
  166. `step-ca` uses [sigstore/cosign](https://github.com/sigstore/cosign) for signing and verifying release artifacts.
  167. Below is an example using `cosign` to verify a release artifact:
  168. ```
  169. cosign verify-blob \
  170. --certificate step-ca_darwin_{{ .Version }}_amd64.tar.gz.pem \
  171. --signature step-ca_darwin_{{ .Version }}_amd64.tar.gz.sig \
  172. --certificate-identity-regexp "https://github\.com/smallstep/workflows/.*" \
  173. --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  174. step-ca_darwin_{{ .Version }}_amd64.tar.gz
  175. ```
  176. The `checksums.txt` file (in the `Assets` section below) contains a checksum for every artifact in the release.
  177. # Footer template for the release body.
  178. # Defaults to empty.
  179. footer: |
  180. ## Thanks!
  181. Those were the changes on {{ .Tag }}!
  182. Come join us on [Discord](https://discord.gg/X2RKGwEbV9) to ask questions, chat about PKI, or get a sneak peek at the freshest PKI memes.
  183. # You can disable this pipe in order to not upload any artifacts.
  184. # Defaults to false.
  185. #disable: true
  186. # You can add extra pre-existing files to the release.
  187. # The filename on the release will be the last part of the path (base). If
  188. # another file with the same name exists, the latest one found will be used.
  189. # Defaults to empty.
  190. extra_files:
  191. - glob: ./.releases/*
  192. #extra_files:
  193. # - glob: ./path/to/file.txt
  194. # - glob: ./glob/**/to/**/file/**/*
  195. # - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
  196. winget:
  197. -
  198. # IDs of the archives to use.
  199. # Empty means all IDs.
  200. ids: [ default ]
  201. #
  202. # Default: ProjectName
  203. # Templates: allowed
  204. name: step-ca
  205. # Publisher name.
  206. #
  207. # Templates: allowed
  208. # Required.
  209. publisher: Smallstep
  210. # Your app's description.
  211. #
  212. # Templates: allowed
  213. # Required.
  214. short_description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management."
  215. # License name.
  216. #
  217. # Templates: allowed
  218. # Required.
  219. license: "Apache-2.0"
  220. # Publisher URL.
  221. #
  222. # Templates: allowed
  223. publisher_url: "https://smallstep.com"
  224. # Publisher support URL.
  225. #
  226. # Templates: allowed
  227. publisher_support_url: "https://github.com/smallstep/certificates/discussions"
  228. # URL which is determined by the given Token (github, gitlab or gitea).
  229. #
  230. # Default depends on the client.
  231. # Templates: allowed
  232. url_template: "https://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  233. # Git author used to commit to the repository.
  234. commit_author:
  235. name: goreleaserbot
  236. email: goreleaser@smallstep.com
  237. # The project name and current git tag are used in the format string.
  238. #
  239. # Templates: allowed
  240. commit_msg_template: "{{ .PackageIdentifier }}: {{ .Tag }}"
  241. # Your app's homepage.
  242. homepage: "https://github.com/smallstep/certificates"
  243. # Your app's long description.
  244. #
  245. # Templates: allowed
  246. description: ""
  247. # License URL.
  248. #
  249. # Templates: allowed
  250. license_url: "https://github.com/smallstep/certificates/blob/master/LICENSE"
  251. # Release notes URL.
  252. #
  253. # Templates: allowed
  254. release_notes_url: "https://github.com/smallstep/certificates/releases/tag/{{ .Tag }}"
  255. # Create the PR - for testing
  256. skip_upload: auto
  257. # Tags.
  258. tags:
  259. - certificates
  260. - smallstep
  261. - tls
  262. # Repository to push the generated files to.
  263. repository:
  264. owner: smallstep
  265. name: winget-pkgs
  266. branch: "step-ca-{{.Version}}"
  267. # Optionally a token can be provided, if it differs from the token
  268. # provided to GoReleaser
  269. # Templates: allowed
  270. #token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
  271. # Sets up pull request creation instead of just pushing to the given branch.
  272. # Make sure the 'branch' property is different from base before enabling
  273. # it.
  274. #
  275. # Since: v1.17
  276. pull_request:
  277. # Whether to enable it or not.
  278. enabled: true
  279. check_boxes: true
  280. # Whether to open the PR as a draft or not.
  281. #
  282. # Default: false
  283. # Since: v1.19
  284. # draft: true
  285. # Base can also be another repository, in which case the owner and name
  286. # above will be used as HEAD, allowing cross-repository pull requests.
  287. #
  288. # Since: v1.19
  289. base:
  290. owner: microsoft
  291. name: winget-pkgs
  292. branch: master
  293. scoops:
  294. -
  295. ids: [ default ]
  296. # Template for the url which is determined by the given Token (github or gitlab)
  297. # Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  298. # Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
  299. # Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  300. url_template: "http://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  301. # Repository to push the app manifest to.
  302. repository:
  303. owner: smallstep
  304. name: scoop-bucket
  305. branch: main
  306. # Git author used to commit to the repository.
  307. # Defaults are shown.
  308. commit_author:
  309. name: goreleaserbot
  310. email: goreleaser@smallstep.com
  311. # The project name and current git tag are used in the format string.
  312. commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
  313. # Your app's homepage.
  314. # Default is empty.
  315. homepage: "https://smallstep.com/docs/step-ca"
  316. # Skip uploads for prerelease.
  317. skip_upload: auto
  318. # Your app's description.
  319. # Default is empty.
  320. description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH."
  321. # Your app's license
  322. # Default is empty.
  323. license: "Apache-2.0"