mirror of
https://github.com/hanzokms/packer-plugin.git
synced 2026-10-30 20:38:34 +00:00
102 lines
3.1 KiB
YAML
102 lines
3.1 KiB
YAML
# This is an example goreleaser.yaml file with some defaults.
|
|
# Make sure to check the documentation at http://goreleaser.com
|
|
env:
|
|
- CGO_ENABLED=0
|
|
before:
|
|
hooks:
|
|
# We strongly recommend running tests to catch any regression before release.
|
|
# Even though, this an optional step.
|
|
- go test ./...
|
|
# Check plugin compatibility with required version of the Packer SDK
|
|
- make plugin-check
|
|
# Copy LICENSE file for inclusion in zip archive
|
|
- cp LICENSE LICENSE.txt
|
|
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 }}"
|
|
- id: linux-builds
|
|
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
|
|
- "386"
|
|
- arm
|
|
- arm64
|
|
ignore:
|
|
- goos: linux
|
|
goarch: amd64
|
|
binary: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}"
|
|
- id: darwin-builds
|
|
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:
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
binary: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}"
|
|
- id: other-builds
|
|
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:
|
|
- netbsd
|
|
- openbsd
|
|
- freebsd
|
|
- windows
|
|
- solaris
|
|
goarch:
|
|
- amd64
|
|
- "386"
|
|
- arm
|
|
ignore:
|
|
- goos: windows
|
|
goarch: arm
|
|
- goos: solaris
|
|
goarch: arm
|
|
- goos: solaris
|
|
goarch: "386"
|
|
binary: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}"
|
|
archives:
|
|
- format: zip
|
|
files:
|
|
- "LICENSE.txt"
|
|
|
|
name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}"
|
|
checksum:
|
|
name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS"
|
|
algorithm: sha256
|
|
signs:
|
|
- artifacts: checksum
|
|
args:
|
|
- "--batch"
|
|
- "--local-user"
|
|
- "{{ .Env.GPG_FINGERPRINT }}"
|
|
- "--output"
|
|
- "${signature}"
|
|
- "--detach-sign"
|
|
- "${artifact}"
|
|
|
|
changelog:
|
|
use: github-native
|