# This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com env: - CGO_ENABLED=0 before: hooks: # TODO(ddelnano): for now there aren't tests to run # - go test ./... # As part of the release doc files are included as a separate deliverable for # consumption by Packer.io. To include a separate docs.zip uncomment the following command. #- make ci-release-docs # Check plugin compatibility with required version of the Packer SDK - make plugin-check builds: # A separated build to run the packer-plugins-check only once for a linux_amd64 binary - id: plugin-check mod_timestamp: '{{ .CommitTimestamp }}' flags: - -trimpath #removes all file system paths from the compiled executable ldflags: - '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= ' goos: - linux goarch: - amd64 binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' - mod_timestamp: '{{ .CommitTimestamp }}' flags: - -trimpath #removes all file system paths from the compiled executable ldflags: - '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= ' goos: - freebsd - windows - linux - darwin goarch: - amd64 - '386' - arm - arm64 ignore: - goos: darwin goarch: '386' - goos: linux goarch: amd64 binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' archives: - format: zip files: - none* name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}' checksum: name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS' algorithm: sha256 signs: - artifacts: checksum args: # if you are using this is in a GitHub action or some other automated pipeline, you # need to pass the batch flag to indicate its not interactive. - "--batch" - "--local-user" - "{{ .Env.GPG_FINGERPRINT }}" - "--output" - "${signature}" - "--detach-sign" - "${artifact}" release: draft: true changelog: skip: true