diff --git a/.goreleaser.yml b/.goreleaser.yml index d2cb0af..012beee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,10 +20,30 @@ builds: - -X github.com/linuxsuren/cobra-extension/version.commit={{.ShortCommit}} - -X github.com/linuxsuren/cobra-extension/version.date={{.Date}} - -w +- env: + - CGO_ENABLED=0 + id: "kubectl-ks" + binary: kubectl-ks + main: ./kubectl-plugin/kubectl-ks.go + goarch: + - amd64 + goos: + - linux + - darwin + hooks: + post: + - upx "{{ .Path }}" + ldflags: + - -X github.com/linuxsuren/cobra-extension/version.version={{.Version}} + - -X github.com/linuxsuren/cobra-extension/version.commit={{.ShortCommit}} + - -X github.com/linuxsuren/cobra-extension/version.date={{.Date}} + - -w dist: bin archives: - name_template: "ks-{{ .Os }}-{{ .Arch }}" id: "ks" + builds: + - ks replacements: darwin: darwin linux: linux @@ -36,6 +56,17 @@ archives: files: - README.md - LICENSE + - name_template: "kubectl-ks-{{ .Os }}-{{ .Arch }}" + id: "kubectl-ks" + builds: + - "kubectl-ks" + replacements: + darwin: darwin + linux: linux + amd64: amd64 + files: + - README.md + - LICENSE checksum: name_template: 'checksums.txt' snapshot: