-
Notifications
You must be signed in to change notification settings - Fork 14
/
.goreleaser.yml
108 lines (98 loc) · 3.44 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
version: 2
env:
- GO111MODULE=on
- GOPROXY=https://gocenter.io
- LOCAL_ORG={{ .Env.LOCAL_ORG }}
builds:
- id: lagoon
binary: lagoon
env:
- CGO_ENABLED=0
- GO111MODULE=on
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X github.com/uselagoon/lagoon-cli/cmd.lagoonCLIVersion=v{{ .Version }}
-X github.com/uselagoon/lagoon-cli/cmd.lagoonCLIBuild={{ .Date }}
-X github.com/uselagoon/lagoon-cli/cmd.lagoonCLIBuildGoVersion=go-{{ .Env.GOVERSION }}
goos:
- linux
- darwin
goarch:
- amd64
- arm64
# universal_binaries:
# - id: lagoon
# name_template: lagoon
# replace: true
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
header: |
## Lagoon CLI (v{{.Version}})
### Installation via Brew
The preferred method is installation via [Homebrew](https://brew.sh/).
```
brew tap {{ .Env.LOCAL_ORG }}/lagoon-cli
brew install lagoon
```
### Running from released binaries
Alternatively, you may install by downloading one of the pre-compiled binaries
```
# MacOS
sudo curl -L "https://github.com/{{ .Env.LOCAL_ORG }}/lagoon-cli/releases/download/v{{.Version}}/lagoon-cli-v{{.Version}}-darwin-arm64" -o /usr/local/bin/lagoon && sudo chmod +x /usr/local/bin/lagoon
# Linux
sudo curl -L "https://github.com/{{ .Env.LOCAL_ORG }}/lagoon-cli/releases/download/v{{.Version}}/lagoon-cli-v{{.Version}}-linux-amd64" -o /usr/local/bin/lagoon && sudo chmod +x /usr/local/bin/lagoon
```
### Running from a Dockerfile
Alternatively, you may download the latest release as a Dockerfile from [GitHub](https://github.com/{{ .Env.LOCAL_ORG }}/lagoon-cli/pkgs/container/lagoon-cli) or [Docker Hub](https://hub.docker.com/r/{{ .Env.LOCAL_ORG }}/lagoon-cli)
See the [docs](https://uselagoon.github.io/lagoon-cli/#running_as_a_docker_image) for information on running as a Dockerfile
```
docker pull ghcr.io/{{ .Env.LOCAL_ORG }}/lagoon-cli:v{{.Version}}
docker pull docker.io/{{ .Env.LOCAL_ORG }}/lagoon-cli:v{{.Version}}
```
# Defaults to empty.
name_template: "{{.ProjectName}}-v{{.Version}}"
archives:
- id: binaries
builds:
- lagoon
format: binary
name_template: "{{ .ProjectName }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
files:
- none*
- id: binaries-targz
builds:
- lagoon
format: tar.gz
name_template: "{{ .ProjectName }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
source:
enabled: true
format: 'tar.gz'
name_template: "{{ .ProjectName }}-v{{ .Version }}-source"
checksum:
name_template: 'checksums.txt'
algorithm: sha256
# signs:
# - artifacts: checksum
# args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- name: lagoon
repository:
owner: "{{ .Env.LOCAL_ORG }}"
name: homebrew-lagoon-cli
homepage: "https://github.com/{{ .Env.LOCAL_ORG }}/lagoon-cli"
description: "Lagoon's local development helper tool"
skip_upload: false
test: system "#{bin}/lagoon version"
install: bin.install "lagoon"
ids:
- binaries-targz