2022-06-08 01:44:22 -05:00
|
|
|
# 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:
|
2022-06-09 23:53:51 -05:00
|
|
|
# TODO(ddelnano): for now there aren't tests to run
|
2022-06-08 01:44:22 -05:00
|
|
|
# - go test ./...
|
2022-06-09 23:53:51 -05:00
|
|
|
# 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
|
2022-06-08 01:44:22 -05:00
|
|
|
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:
|
2022-06-09 23:53:51 -05:00
|
|
|
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
|
2022-06-08 01:44:22 -05:00
|
|
|
goos:
|
|
|
|
- linux
|
|
|
|
goarch:
|
|
|
|
- amd64
|
|
|
|
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
2022-06-09 23:53:51 -05:00
|
|
|
-
|
2022-06-08 01:44:22 -05:00
|
|
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
|
|
|
flags:
|
|
|
|
- -trimpath #removes all file system paths from the compiled executable
|
|
|
|
ldflags:
|
2022-06-09 23:53:51 -05:00
|
|
|
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
|
2022-06-08 01:44:22 -05:00
|
|
|
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
|
2022-06-09 23:53:51 -05:00
|
|
|
files:
|
|
|
|
- none*
|
2022-06-08 01:44:22 -05:00
|
|
|
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
|
|
|
checksum:
|
|
|
|
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
|
|
|
|
algorithm: sha256
|
|
|
|
signs:
|
|
|
|
- artifacts: checksum
|
|
|
|
args:
|
2022-06-09 23:53:51 -05:00
|
|
|
# if you are using this is in a GitHub action or some other automated pipeline, you
|
2022-06-08 01:44:22 -05:00
|
|
|
# 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
|
2022-06-09 23:53:51 -05:00
|
|
|
|
2022-06-08 01:44:22 -05:00
|
|
|
changelog:
|
|
|
|
skip: true
|