4
0

.goreleaser.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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}.sigstore.json"
  114. args:
  115. - "sign-blob"
  116. - "--bundle=${signature}"
  117. - "${artifact}"
  118. - "--yes"
  119. artifacts: all
  120. publishers:
  121. - name: Google Cloud Artifact Registry
  122. ids:
  123. - packages
  124. cmd: ./scripts/package-upload.sh {{ abs .ArtifactPath }} {{ .Var.packageName }} {{ .Version }} {{ .Var.packageRelease }}
  125. snapshot:
  126. name_template: "{{ .Tag }}-next"
  127. release:
  128. # Repo in which the release will be created.
  129. # Default is extracted from the origin remote URL or empty if its private hosted.
  130. # Note: it can only be one: either github, gitlab or gitea
  131. github:
  132. owner: smallstep
  133. name: certificates
  134. # IDs of the archives to use.
  135. # Defaults to all.
  136. #ids:
  137. # - foo
  138. # - bar
  139. # If set to true, will not auto-publish the release.
  140. # Default is false.
  141. draft: false
  142. # If set to auto, will mark the release as not ready for production
  143. # in case there is an indicator for this in the tag e.g. v1.0.0-rc1
  144. # If set to true, will mark the release as not ready for production.
  145. # Default is false.
  146. prerelease: auto
  147. # You can change the name of the release.
  148. # Default is `{{.Tag}}`
  149. name_template: "Step CA {{ .Tag }} ({{ .Env.RELEASE_DATE }})"
  150. # Header template for the release body.
  151. # Defaults to empty.
  152. header: |
  153. ## Official Release Artifacts
  154. #### Linux
  155. - 📦 [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)
  156. - 📦 [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)
  157. - 📦 [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)
  158. - 📦 [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)
  159. - 📦 [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)
  160. #### OSX Darwin
  161. - 📦 [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)
  162. - 📦 [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)
  163. #### Windows
  164. - 📦 [step-ca_windows_{{ .Version }}_amd64.zip](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_windows_{{ .Version }}_amd64.zip)
  165. For more builds across platforms and architectures, see the `Assets` section below.
  166. And for packaged versions (Docker, k8s, Homebrew), see our [installation docs](https://smallstep.com/docs/step-ca/installation).
  167. Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/certificates/issues/new/choose).
  168. ## Signatures and Checksums
  169. `step-ca` uses [sigstore/cosign](https://github.com/sigstore/cosign) for signing and verifying release artifacts.
  170. Below is an example using `cosign` to verify a release artifact:
  171. ```
  172. cosign verify-blob \
  173. --bundle step-ca_darwin_{{ .Version }}_amd64.tar.gz.sigstore.json \
  174. --certificate-identity-regexp "https://github\.com/smallstep/workflows/.*" \
  175. --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  176. step-ca_darwin_{{ .Version }}_amd64.tar.gz
  177. ```
  178. The `checksums.txt` file (in the `Assets` section below) contains a checksum for every artifact in the release.
  179. # Footer template for the release body.
  180. # Defaults to empty.
  181. footer: |
  182. ## Thanks!
  183. Those were the changes on {{ .Tag }}!
  184. 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.
  185. # You can disable this pipe in order to not upload any artifacts.
  186. # Defaults to false.
  187. #disable: true
  188. # You can add extra pre-existing files to the release.
  189. # The filename on the release will be the last part of the path (base). If
  190. # another file with the same name exists, the latest one found will be used.
  191. # Defaults to empty.
  192. extra_files:
  193. - glob: ./.releases/*
  194. #extra_files:
  195. # - glob: ./path/to/file.txt
  196. # - glob: ./glob/**/to/**/file/**/*
  197. # - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
  198. winget:
  199. -
  200. # IDs of the archives to use.
  201. # Empty means all IDs.
  202. ids: [ default ]
  203. #
  204. # Default: ProjectName
  205. # Templates: allowed
  206. name: step-ca
  207. # Publisher name.
  208. #
  209. # Templates: allowed
  210. # Required.
  211. publisher: Smallstep
  212. # Your app's description.
  213. #
  214. # Templates: allowed
  215. # Required.
  216. short_description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management."
  217. # Package identifier.
  218. #
  219. # Default: Publisher.ProjectName
  220. # Templates: allowed
  221. package_identifier: Smallstep.step-ca
  222. # License name.
  223. #
  224. # Templates: allowed
  225. # Required.
  226. license: "Apache-2.0"
  227. # Publisher URL.
  228. #
  229. # Templates: allowed
  230. publisher_url: "https://smallstep.com"
  231. # Publisher support URL.
  232. #
  233. # Templates: allowed
  234. publisher_support_url: "https://github.com/smallstep/certificates/discussions"
  235. # Privacy URL.
  236. #
  237. # Templates: allowed
  238. privacy_url: "https://smallstep.com/privacy-policy/"
  239. # URL which is determined by the given Token (github, gitlab or gitea).
  240. #
  241. # Default depends on the client.
  242. # Templates: allowed
  243. url_template: "https://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  244. # Git author used to commit to the repository.
  245. commit_author:
  246. name: goreleaserbot
  247. email: goreleaser@smallstep.com
  248. # The project name and current git tag are used in the format string.
  249. #
  250. # Templates: allowed
  251. commit_msg_template: "{{ .PackageIdentifier }}: {{ .Tag }}"
  252. # Your app's homepage.
  253. homepage: "https://github.com/smallstep/certificates"
  254. # Your app's long description.
  255. #
  256. # Templates: allowed
  257. description: "step-ca is an online certificate authority for secure, automated certificate management. It issues X.509 and SSH certificates using protocols like ACME, OIDC, and SCEP."
  258. # License URL.
  259. #
  260. # Templates: allowed
  261. license_url: "https://github.com/smallstep/certificates/blob/master/LICENSE"
  262. # Release notes.
  263. #
  264. # Templates: allowed
  265. release_notes: "{{.Changelog}}"
  266. # Release notes URL.
  267. #
  268. # Templates: allowed
  269. release_notes_url: "https://github.com/smallstep/certificates/releases/tag/{{ .Tag }}"
  270. # Installation notes.
  271. #
  272. # Templates: allowed
  273. installation_notes: "After installation, run 'step-ca --help' to get started. Documentation: https://smallstep.com/docs/step-ca"
  274. # Create the PR - for testing
  275. skip_upload: auto
  276. # Tags.
  277. tags:
  278. - certificates
  279. - smallstep
  280. - tls
  281. # Repository to push the generated files to.
  282. repository:
  283. owner: smallstep
  284. name: winget-pkgs
  285. branch: "step-ca-{{.Version}}"
  286. # Optionally a token can be provided, if it differs from the token
  287. # provided to GoReleaser
  288. # Templates: allowed
  289. #token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
  290. # Sets up pull request creation instead of just pushing to the given branch.
  291. # Make sure the 'branch' property is different from base before enabling
  292. # it.
  293. #
  294. # Since: v1.17
  295. pull_request:
  296. # Whether to enable it or not.
  297. enabled: true
  298. check_boxes: true
  299. # Whether to open the PR as a draft or not.
  300. #
  301. # Default: false
  302. # Since: v1.19
  303. # draft: true
  304. # Base can also be another repository, in which case the owner and name
  305. # above will be used as HEAD, allowing cross-repository pull requests.
  306. #
  307. # Since: v1.19
  308. base:
  309. owner: microsoft
  310. name: winget-pkgs
  311. branch: master
  312. scoops:
  313. -
  314. ids: [ default ]
  315. # Template for the url which is determined by the given Token (github or gitlab)
  316. # Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  317. # Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
  318. # Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  319. url_template: "http://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
  320. # Repository to push the app manifest to.
  321. repository:
  322. owner: smallstep
  323. name: scoop-bucket
  324. branch: main
  325. # Git author used to commit to the repository.
  326. # Defaults are shown.
  327. commit_author:
  328. name: goreleaserbot
  329. email: goreleaser@smallstep.com
  330. # The project name and current git tag are used in the format string.
  331. commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
  332. # Your app's homepage.
  333. # Default is empty.
  334. homepage: "https://smallstep.com/docs/step-ca"
  335. # Skip uploads for prerelease.
  336. skip_upload: auto
  337. # Your app's description.
  338. # Default is empty.
  339. description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH."
  340. # Your app's license
  341. # Default is empty.
  342. license: "Apache-2.0"