| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- # Documentation: https://goreleaser.com/customization/
- # yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
- project_name: step-ca
- version: 2
- variables:
- packageName: step-ca
- packageRelease: 1 # Manually update release: in the nfpm section to match this value if you change this
- before:
- hooks:
- # You may remove this if you don't use go modules.
- - go mod download
- after:
- hooks:
- # This script depends on IS_PRERELEASE env being set. This is set by CI in the Is Pre-release step.
- - cmd: bash scripts/package-repo-import.sh {{ .Var.packageName }} {{ .Version }}
- output: true
- builds:
- -
- id: step-ca
- env:
- - CGO_ENABLED=0
- targets:
- - darwin_amd64
- - darwin_arm64
- - freebsd_amd64
- - linux_386
- - linux_amd64
- - linux_arm64
- - linux_arm_5
- - linux_arm_6
- - linux_arm_7
- - windows_amd64
- flags:
- - -trimpath
- main: ./cmd/step-ca/main.go
- binary: step-ca
- ldflags:
- - -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
- archives:
- - &ARCHIVE
- # Can be used to change the archive formats for specific GOOSs.
- # Most common use case is to archive as zip on Windows.
- # Default is empty.
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
- format_overrides:
- - goos: windows
- format: zip
- files:
- - README.md
- - LICENSE
- allow_different_binary_count: true
- -
- << : *ARCHIVE
- id: unversioned
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
- wrap_in_directory: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
- nfpms:
- # Configure nFPM for .deb and .rpm releases
- #
- # See https://nfpm.goreleaser.com/configuration/
- # and https://goreleaser.com/customization/nfpm/
- #
- # Useful tools for debugging .debs:
- # List file contents: dpkg -c dist/step_...deb
- # Package metadata: dpkg --info dist/step_....deb
- #
- - &NFPM
- id: packages
- builds:
- - step-ca
- package_name: "{{ .Var.packageName }}"
- release: "1"
- file_name_template: >-
- {{- trimsuffix .ConventionalFileName .ConventionalExtension -}}
- {{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}}
- {{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}}
- {{- .ConventionalExtension -}}
- vendor: Smallstep Labs
- homepage: https://github.com/smallstep/certificates
- maintainer: Smallstep <techadmin@smallstep.com>
- description: >
- step-ca is an online certificate authority for secure, automated certificate management.
- license: Apache 2.0
- section: utils
- formats:
- - deb
- - rpm
- priority: optional
- bindir: /usr/bin
- contents:
- - src: debian/copyright
- dst: /usr/share/doc/step-ca/copyright
- rpm:
- signature:
- key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
- deb:
- signature:
- key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
- type: origin
- -
- << : *NFPM
- id: unversioned
- file_name_template: "{{ .PackageName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
- source:
- enabled: true
- name_template: '{{ .ProjectName }}_{{ .Version }}'
- checksum:
- name_template: 'checksums.txt'
- extra_files:
- - glob: ./.releases/*
- signs:
- - cmd: cosign
- signature: "${artifact}.sig"
- certificate: "${artifact}.pem"
- args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}", "--yes"]
- artifacts: all
- publishers:
- - name: Google Cloud Artifact Registry
- ids:
- - packages
- cmd: ./scripts/package-upload.sh {{ abs .ArtifactPath }} {{ .Var.packageName }} {{ .Version }} {{ .Var.packageRelease }}
- snapshot:
- name_template: "{{ .Tag }}-next"
- release:
- # Repo in which the release will be created.
- # Default is extracted from the origin remote URL or empty if its private hosted.
- # Note: it can only be one: either github, gitlab or gitea
- github:
- owner: smallstep
- name: certificates
- # IDs of the archives to use.
- # Defaults to all.
- #ids:
- # - foo
- # - bar
- # If set to true, will not auto-publish the release.
- # Default is false.
- draft: false
- # If set to auto, will mark the release as not ready for production
- # in case there is an indicator for this in the tag e.g. v1.0.0-rc1
- # If set to true, will mark the release as not ready for production.
- # Default is false.
- prerelease: auto
- # You can change the name of the release.
- # Default is `{{.Tag}}`
- name_template: "Step CA {{ .Tag }} ({{ .Env.RELEASE_DATE }})"
- # Header template for the release body.
- # Defaults to empty.
- header: |
- ## Official Release Artifacts
- #### Linux
- - 📦 [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)
- - 📦 [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)
- - 📦 [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)
- - 📦 [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)
- - 📦 [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)
- #### OSX Darwin
- - 📦 [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)
- - 📦 [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)
- #### Windows
- - 📦 [step-ca_windows_{{ .Version }}_amd64.zip](https://dl.smallstep.com/gh-release/certificates/gh-release-header/{{ .Tag }}/step-ca_windows_{{ .Version }}_amd64.zip)
- For more builds across platforms and architectures, see the `Assets` section below.
- And for packaged versions (Docker, k8s, Homebrew), see our [installation docs](https://smallstep.com/docs/step-ca/installation).
- Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/certificates/issues/new/choose).
- ## Signatures and Checksums
- `step-ca` uses [sigstore/cosign](https://github.com/sigstore/cosign) for signing and verifying release artifacts.
- Below is an example using `cosign` to verify a release artifact:
- ```
- cosign verify-blob \
- --certificate step-ca_darwin_{{ .Version }}_amd64.tar.gz.pem \
- --signature step-ca_darwin_{{ .Version }}_amd64.tar.gz.sig \
- --certificate-identity-regexp "https://github\.com/smallstep/workflows/.*" \
- --certificate-oidc-issuer https://token.actions.githubusercontent.com \
- step-ca_darwin_{{ .Version }}_amd64.tar.gz
- ```
- The `checksums.txt` file (in the `Assets` section below) contains a checksum for every artifact in the release.
- # Footer template for the release body.
- # Defaults to empty.
- footer: |
- ## Thanks!
- Those were the changes on {{ .Tag }}!
- 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.
- # You can disable this pipe in order to not upload any artifacts.
- # Defaults to false.
- #disable: true
- # You can add extra pre-existing files to the release.
- # The filename on the release will be the last part of the path (base). If
- # another file with the same name exists, the latest one found will be used.
- # Defaults to empty.
- extra_files:
- - glob: ./.releases/*
- #extra_files:
- # - glob: ./path/to/file.txt
- # - glob: ./glob/**/to/**/file/**/*
- # - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
- winget:
- -
- # IDs of the archives to use.
- # Empty means all IDs.
- ids: [ default ]
- #
- # Default: ProjectName
- # Templates: allowed
- name: step-ca
- # Publisher name.
- #
- # Templates: allowed
- # Required.
- publisher: Smallstep
- # Your app's description.
- #
- # Templates: allowed
- # Required.
- short_description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management."
- # License name.
- #
- # Templates: allowed
- # Required.
- license: "Apache-2.0"
- # Publisher URL.
- #
- # Templates: allowed
- publisher_url: "https://smallstep.com"
- # Publisher support URL.
- #
- # Templates: allowed
- publisher_support_url: "https://github.com/smallstep/certificates/discussions"
- # URL which is determined by the given Token (github, gitlab or gitea).
- #
- # Default depends on the client.
- # Templates: allowed
- url_template: "https://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
- # Git author used to commit to the repository.
- commit_author:
- name: goreleaserbot
- email: goreleaser@smallstep.com
- # The project name and current git tag are used in the format string.
- #
- # Templates: allowed
- commit_msg_template: "{{ .PackageIdentifier }}: {{ .Tag }}"
- # Your app's homepage.
- homepage: "https://github.com/smallstep/certificates"
- # Your app's long description.
- #
- # Templates: allowed
- description: ""
- # License URL.
- #
- # Templates: allowed
- license_url: "https://github.com/smallstep/certificates/blob/master/LICENSE"
- # Release notes URL.
- #
- # Templates: allowed
- release_notes_url: "https://github.com/smallstep/certificates/releases/tag/{{ .Tag }}"
- # Create the PR - for testing
- skip_upload: auto
- # Tags.
- tags:
- - certificates
- - smallstep
- - tls
- # Repository to push the generated files to.
- repository:
- owner: smallstep
- name: winget-pkgs
- branch: "step-ca-{{.Version}}"
- # Optionally a token can be provided, if it differs from the token
- # provided to GoReleaser
- # Templates: allowed
- #token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
- # Sets up pull request creation instead of just pushing to the given branch.
- # Make sure the 'branch' property is different from base before enabling
- # it.
- #
- # Since: v1.17
- pull_request:
- # Whether to enable it or not.
- enabled: true
- check_boxes: true
- # Whether to open the PR as a draft or not.
- #
- # Default: false
- # Since: v1.19
- # draft: true
- # Base can also be another repository, in which case the owner and name
- # above will be used as HEAD, allowing cross-repository pull requests.
- #
- # Since: v1.19
- base:
- owner: microsoft
- name: winget-pkgs
- branch: master
- scoops:
- -
- ids: [ default ]
- # Template for the url which is determined by the given Token (github or gitlab)
- # Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
- # Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
- # Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
- url_template: "http://github.com/smallstep/certificates/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
- # Repository to push the app manifest to.
- repository:
- owner: smallstep
- name: scoop-bucket
- branch: main
- # Git author used to commit to the repository.
- # Defaults are shown.
- commit_author:
- name: goreleaserbot
- email: goreleaser@smallstep.com
- # The project name and current git tag are used in the format string.
- commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
- # Your app's homepage.
- # Default is empty.
- homepage: "https://smallstep.com/docs/step-ca"
- # Skip uploads for prerelease.
- skip_upload: auto
- # Your app's description.
- # Default is empty.
- description: "A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH."
- # Your app's license
- # Default is empty.
- license: "Apache-2.0"
|