.goreleaser.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # This is an example .goreleaser.yml file with some sane defaults.
  2. # Make sure to check the documentation at http://goreleaser.com
  3. project_name: step-ca
  4. before:
  5. hooks:
  6. # You may remove this if you don't use go modules.
  7. - go mod download
  8. builds:
  9. -
  10. id: step-ca
  11. env:
  12. - CGO_ENABLED=0
  13. targets:
  14. - darwin_amd64
  15. - darwin_arm64
  16. - freebsd_amd64
  17. - linux_386
  18. - linux_amd64
  19. - linux_arm64
  20. - linux_arm_5
  21. - linux_arm_6
  22. - linux_arm_7
  23. - windows_amd64
  24. flags:
  25. - -trimpath
  26. main: ./cmd/step-ca/main.go
  27. binary: step-ca
  28. ldflags:
  29. - -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
  30. archives:
  31. -
  32. # Can be used to change the archive formats for specific GOOSs.
  33. # Most common use case is to archive as zip on Windows.
  34. # Default is empty.
  35. name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  36. format_overrides:
  37. - goos: windows
  38. format: zip
  39. wrap_in_directory: "{{ .ProjectName }}_{{ .Version }}"
  40. files:
  41. - README.md
  42. - LICENSE
  43. allow_different_binary_count: true
  44. nfpms:
  45. # Configure nFPM for .deb and .rpm releases
  46. #
  47. # See https://nfpm.goreleaser.com/configuration/
  48. # and https://goreleaser.com/customization/nfpm/
  49. #
  50. # Useful tools for debugging .debs:
  51. # List file contents: dpkg -c dist/step_...deb
  52. # Package metadata: dpkg --info dist/step_....deb
  53. #
  54. -
  55. builds:
  56. - step-ca
  57. package_name: step-ca
  58. file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
  59. vendor: Smallstep Labs
  60. homepage: https://github.com/smallstep/certificates
  61. maintainer: Smallstep <techadmin@smallstep.com>
  62. description: >
  63. step-ca is an online certificate authority for secure, automated certificate management.
  64. license: Apache 2.0
  65. section: utils
  66. formats:
  67. - deb
  68. - rpm
  69. priority: optional
  70. bindir: /usr/bin
  71. contents:
  72. - src: debian/copyright
  73. dst: /usr/share/doc/step-ca/copyright
  74. source:
  75. enabled: true
  76. name_template: '{{ .ProjectName }}_{{ .Version }}'
  77. checksum:
  78. name_template: 'checksums.txt'
  79. extra_files:
  80. - glob: ./.releases/*
  81. signs:
  82. - cmd: cosign
  83. signature: "${artifact}.sig"
  84. certificate: "${artifact}.pem"
  85. args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}"]
  86. artifacts: all
  87. snapshot:
  88. name_template: "{{ .Tag }}-next"
  89. release:
  90. # Repo in which the release will be created.
  91. # Default is extracted from the origin remote URL or empty if its private hosted.
  92. # Note: it can only be one: either github, gitlab or gitea
  93. github:
  94. owner: smallstep
  95. name: certificates
  96. # IDs of the archives to use.
  97. # Defaults to all.
  98. #ids:
  99. # - foo
  100. # - bar
  101. # If set to true, will not auto-publish the release.
  102. # Default is false.
  103. draft: false
  104. # If set to auto, will mark the release as not ready for production
  105. # in case there is an indicator for this in the tag e.g. v1.0.0-rc1
  106. # If set to true, will mark the release as not ready for production.
  107. # Default is false.
  108. prerelease: auto
  109. # You can change the name of the release.
  110. # Default is `{{.Tag}}`
  111. name_template: "Step CA {{ .Tag }} ({{ .Env.RELEASE_DATE }})"
  112. # Header template for the release body.
  113. # Defaults to empty.
  114. header: |
  115. ## Official Release Artifacts
  116. #### Linux
  117. - 📦 [step-ca_linux_{{ .Version }}_amd64.tar.gz](https://dl.step.sm/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_linux_{{ .Version }}_amd64.tar.gz)
  118. - 📦 [step-ca_{{ .Version }}_amd64.deb](https://dl.step.sm/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_{{ .Version }}_amd64.deb)
  119. #### OSX Darwin
  120. - 📦 [step-ca_darwin_{{ .Version }}_amd64.tar.gz](https://dl.step.sm/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_darwin_{{ .Version }}_amd64.tar.gz)
  121. - 📦 [step-ca_darwin_{{ .Version }}_arm64.tar.gz](https://dl.step.sm/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_darwin_{{ .Version }}_arm64.tar.gz)
  122. #### Windows
  123. - 📦 [step-ca_windows_{{ .Version }}_arm64.zip](https://dl.step.sm/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_windows_{{ .Version }}_amd64.zip)
  124. For more builds across platforms and architectures, see the `Assets` section below.
  125. And for packaged versions (Docker, k8s, Homebrew), see our [installation docs](https://smallstep.com/docs/step-ca/installation).
  126. Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/certificates/issues/new/choose).
  127. ## Signatures and Checksums
  128. `step-ca` uses [sigstore/cosign](https://github.com/sigstore/cosign) for signing and verifying release artifacts.
  129. Below is an example using `cosign` to verify a release artifact:
  130. ```
  131. COSIGN_EXPERIMENTAL=1 cosign verify-blob \
  132. --certificate ~/Downloads/step-ca_darwin_{{ .Version }}_amd64.tar.gz.sig.pem \
  133. --signature ~/Downloads/step-ca_darwin_{{ .Version }}_amd64.tar.gz.sig \
  134. ~/Downloads/step-ca_darwin_{{ .Version }}_amd64.tar.gz
  135. ```
  136. The `checksums.txt` file (in the `Assets` section below) contains a checksum for every artifact in the release.
  137. # Footer template for the release body.
  138. # Defaults to empty.
  139. footer: |
  140. ## Thanks!
  141. Those were the changes on {{ .Tag }}!
  142. Come join us on [Discord](https://discord.gg/X2RKGwEbV9) to ask questions, chat about PKI, or get a sneak peak at the freshest PKI memes.
  143. # You can disable this pipe in order to not upload any artifacts.
  144. # Defaults to false.
  145. #disable: true
  146. # You can add extra pre-existing files to the release.
  147. # The filename on the release will be the last part of the path (base). If
  148. # another file with the same name exists, the latest one found will be used.
  149. # Defaults to empty.
  150. extra_files:
  151. - glob: ./.releases/*
  152. #extra_files:
  153. # - glob: ./path/to/file.txt
  154. # - glob: ./glob/**/to/**/file/**/*
  155. # - glob: ./glob/foo/to/bar/file/foobar/override_from_previous