-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy path.goreleaser.yml
More file actions
154 lines (138 loc) · 4.23 KB
/
.goreleaser.yml
File metadata and controls
154 lines (138 loc) · 4.23 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: 2
before:
hooks:
- ./scripts/completions.sh
- go run ./scripts manpages
builds:
- <<: &build_defaults
main: ./cmd/hcloud/main.go
binary: hcloud
flags:
- -trimpath
ldflags:
- -s
- -w
- -X {{ .ModulePath }}/internal/version.version={{ .Version }}
- -X {{ .ModulePath }}/internal/version.versionPrerelease={{- if .IsSnapshot -}}dev+{{ .ShortCommit }}{{- end -}}
- -X {{ .ModulePath }}/internal/version.commit={{ .FullCommit }}
- -X {{ .ModulePath }}/internal/version.commitDate={{ .CommitDate }}
- -X {{ .ModulePath }}/internal/version.modified={{ .IsGitDirty }}
env:
- CGO_ENABLED=0
id: hcloud-build-linux-main
goos: [linux]
goarch: [amd64, arm64]
- <<: *build_defaults
id: hcloud-build-linux-other
goos: [ linux ]
goarch: [ arm, "386" ]
goarm: [ "6", "7" ]
- <<: *build_defaults
id: hcloud-build-freebsd
goos: [ freebsd ]
goarch: [amd64, arm, arm64, "386"]
goarm: ["6", "7"]
- <<: *build_defaults
id: hcloud-build-windows
goos: [ windows ]
goarch: [ amd64, arm64, "386" ]
- <<: *build_defaults
id: hcloud-build-darwin
goos: [darwin]
goarch: [amd64, arm64]
hooks:
post:
# sign-and-notarize might fails if the Apple license agreement is not signed.
# This ensures that the release process continues instead of stopping and having
# a release without assets. The error is reported at the end of the CI job.
- cmd: bash -c 'quill sign-and-notarize "{{ .Path }}" --dry-run={{ .IsSnapshot }} --ad-hoc={{ .IsSnapshot }} || touch sign-and-notarize.error'
output: true
nfpms:
- id: default
file_name_template: "{{ .ConventionalFileName }}"
package_name: hcloud-cli
ids: [hcloud-build-linux-main]
provides: [hcloud]
vendor: Hetzner Cloud GmbH
homepage: https://github.com/hetznercloud/cli
maintainer: Hetzner Cloud GmbH <support-cloud@hetzner.com>
formats:
- deb
- rpm
description: A command-line interface for Hetzner Cloud
license: MIT
contents:
- src: ./completions/hcloud.bash
dst: /usr/share/bash-completion/completions/hcloud
file_info:
mode: 0644
- src: ./completions/hcloud.fish
dst: /usr/share/fish/vendor_completions.d/hcloud.fish
file_info:
mode: 0644
- src: ./completions/hcloud.zsh
dst: /usr/share/zsh/vendor-completions/_hcloud
file_info:
mode: 0644
- src: ./LICENSE
dst: /usr/share/doc/hcloud/license
file_info:
mode: 0644
- src: ./manpages/*
dst: /usr/share/man/man1/
file_info:
mode: 0644
kos:
- id: container-images
build: hcloud-build-linux-main
main: ./cmd/hcloud/
repositories:
- hetznercloud/cli
platforms:
- linux/amd64
- linux/arm64
base_image: alpine
bare: true
labels:
org.opencontainers.image.source: https://github.com/hetznercloud/cli
tags:
- latest
- "{{.Tag}}"
ldflags:
- -s
- -w
- -X {{ .ModulePath }}/internal/version.version={{ .Version }}
- -X {{ .ModulePath }}/internal/version.versionPrerelease={{- if .IsSnapshot -}}dev+{{ .ShortCommit }}{{- end -}}
- -X {{ .ModulePath }}/internal/version.commit={{ .FullCommit }}
- -X {{ .ModulePath }}/internal/version.commitDate={{ .CommitDate }}
- -X {{ .ModulePath }}/internal/version.modified={{ .IsGitDirty }}
- -X {{ .ModulePath }}/internal/state/config.defaultConfigPathOverride=/config.toml
snapshot:
version_template: "{{ .Version }}"
checksum:
name_template: checksums.txt
algorithm: sha256
signs:
- artifacts: checksum
signature: ${artifact}.sig
id: hcloud-sign
args:
- --batch
- --local-user=github-bot@hetzner-cloud.de
- --pinentry-mode=loopback
- --output=${signature}
- --detach-sign
- ${artifact}
archives:
- id: hcloud-archive
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format_overrides:
- goos: windows
formats: [zip]
files:
- LICENSE
- README.md
- docs/**/*
release:
draft: false
prerelease: auto