-
Notifications
You must be signed in to change notification settings - Fork 36
/
.goreleaser.yml
129 lines (113 loc) · 4.4 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
121
122
123
124
125
126
127
128
129
version: 2
before:
hooks:
- ./scripts/completions.sh
builds:
- env:
- CGO_ENABLED=0
- GOPRIVATE="github.com/spacelift-io"
mod_timestamp: "{{ .CommitTimestamp }}"
flags: [-trimpath, -v]
goos: [windows, linux, darwin]
goarch: [amd64, arm64]
binary: "{{ .ProjectName }}"
archives:
# Our GitHub Action relies on this format and file path, so please don't change it:
# https://github.com/spacelift-io/setup-spacectl
- format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
- completions/*
dockers:
- use: buildx
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.vendor=Spacelift"
- "--label=org.opencontainers.image.description=Spacelift CLI version {{ .Version }}"
- "--label=org.opencontainers.image.url=https://github.com/spacelift-io/spacectl"
- "--label=org.opencontainers.image.documentation=https://github.com/spacelift-io/spacectl/blob/main/README.md"
- "--label=org.opencontainers.image.source=https://github.com/spacelift-io/spacectl"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.created={{ time \"2006-01-02T15:04:05Z07:00\" }}"
image_templates: ["ghcr.io/spacelift-io/spacectl:{{ .Version }}-amd64"]
- use: buildx
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.vendor=Spacelift"
- "--label=org.opencontainers.image.description=Spacelift CLI version {{ .Version }}"
- "--label=org.opencontainers.image.url=https://github.com/spacelift-io/spacectl"
- "--label=org.opencontainers.image.documentation=https://github.com/spacelift-io/spacectl/blob/main/README.md"
- "--label=org.opencontainers.image.source=https://github.com/spacelift-io/spacectl"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.created={{ time \"2006-01-02T15:04:05Z07:00\" }}"
image_templates: ["ghcr.io/spacelift-io/spacectl:{{ .Version }}-arm64"]
docker_manifests:
- name_template: ghcr.io/spacelift-io/spacectl:{{ .Version }}
image_templates:
- ghcr.io/spacelift-io/spacectl:{{ .Version }}-amd64
- ghcr.io/spacelift-io/spacectl:{{ .Version }}-arm64
- name_template: ghcr.io/spacelift-io/spacectl:latest
image_templates:
- ghcr.io/spacelift-io/spacectl:{{ .Version }}-amd64
- ghcr.io/spacelift-io/spacectl:{{ .Version }}-arm64
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
args:
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
draft: false
extra_files:
- glob: ./key.*
header: |
## Artifacts
### Binaries
The binaries are available at the bottom of this release.
### Docker images
The following multi-arch (amd64 and arm64) Docker images have been published:
- `ghcr.io/spacelift-io/spacectl:latest`
- `ghcr.io/spacelift-io/spacectl:{{ .Version }}`
changelog:
use: github-native
brews:
- name: "{{ .ProjectName }}"
repository:
owner: "spacelift-io"
name: "homebrew-spacelift"
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
homepage: https://github.com/spacelift-io/spacectl
description: "Spacelift client and CLI"
license: "MIT"
extra_install: |
bash_completion.install "completions/{{ .ProjectName }}.bash" => "{{ .ProjectName }}"
zsh_completion.install "completions/{{ .ProjectName }}.zsh" => "_{{ .ProjectName }}"
fish_completion.install "completions/{{ .ProjectName }}.fish"
winget:
- name: "{{ .ProjectName }}"
publisher: spacelift-io
license: "MIT"
homepage: https://github.com/spacelift-io/spacectl
short_description: "Spacelift client and CLI"
repository:
owner: spacelift-io
name: winget-pkgs
branch: "spacectl-{{.Version}}"
token: "{{ .Env.WINGET_GITHUB_TOKEN }}"
pull_request:
enabled: false