-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.goreleaser.yml
120 lines (111 loc) · 2.99 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
project_name: vault-token-helper
env:
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org
builds:
- binary: vault-token-helper
id: macos
ldflags: -s -w -X github.com/joemiller/vault-token-helper/cmd.version={{.Version}}+{{.ShortCommit}}
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- amd64
- arm64
hooks:
post: ./scripts/macos-codesign.sh "{{ .Path }}"
# cross-compile windows binary
- binary: vault-token-helper
id: windows
ldflags:
- -s -w -X github.com/joemiller/vault-token-helper/cmd.version={{.Version}}+{{.ShortCommit}}
- "-extldflags '-static'"
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
# cross-compile static linux bin on macos using https://github.com/FiloSottile/homebrew-musl-cross
# brew install FiloSottile/musl-cross/musl-cross
- binary: vault-token-helper
id: linux
ldflags:
- -s -w -X github.com/joemiller/vault-token-helper/cmd.version={{.Version}}+{{.ShortCommit}}
- "-linkmode external -extldflags '-static'"
env:
- CGO_ENABLED=1
- CC=x86_64-linux-musl-gcc
- CXX=x86_64-linux-musl-g++
goos:
- linux
goarch:
- amd64
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- Merge pull request
- Merge branch
# GPG signing
signs:
- artifacts: checksum
archives:
# binary-only releasess - all platforms
- id: binaries
builds: ["linux", "macos", "windows"]
format: binary
# archive releases containg: binary, readme, and license. tarballs (macos, linux), zip (windows)
- id: archives
builds: ["linux", "macos", "windows"]
format_overrides:
- goos: windows
format: zip
# homebrew (macos)
brews:
- ids:
- archives
tap:
owner: joemiller
name: homebrew-taps
commit_author:
name: joe miller
email: [email protected]
folder: Formula
homepage: "https://github.com/joemiller/vault-token-helper"
description: "Cross-platform @hashicorp Vault token helper"
caveats: |
Run this to create the ~/.vault file. This will configure vault to use the token helper:
vault-token-helper enable
dependencies:
- vault
# deb, rpm packages (linux)
nfpms:
- id: "vault-token-helper"
builds: ["linux"]
vendor: "Joe Miller"
homepage: "https://github.com/joemiller/vault-token-helper"
description: "Cross-platform @hashicorp Vault token helper"
maintainer: "[email protected]"
license: MIT
formats:
- deb
- rpm
overrides:
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}"
replacements:
amd64: x86_64
386: i686
arm: armhfp
arm64: aarch64
deb:
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
386: i386
arm: armel