-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
176 lines (157 loc) · 4.72 KB
/
.goreleaser.yaml
File metadata and controls
176 lines (157 loc) · 4.72 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: tiger-cli
# Create VERSION file before building
before:
hooks:
- sh -c 'echo "{{ .Tag }}" > latest.txt'
builds:
- main: ./cmd/tiger
binary: tiger
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- 386
- amd64
- arm64
ldflags:
- -s -w
- -X github.com/timescale/tiger-cli/internal/tiger/cmd.Version={{.Version}}
- -X github.com/timescale/tiger-cli/internal/tiger/cmd.BuildTime={{.Date}}
- -X github.com/timescale/tiger-cli/internal/tiger/cmd.GitCommit={{.Commit}}
archives:
- id: archive
formats: [tar.gz]
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- README.md
- LICENSE
- NOTICE
# Linux package configuration (APT, RPM, etc.)
nfpms:
- id: packages
package_name: tiger-cli
vendor: Timescale, Inc., d/b/a TigerData
homepage: https://github.com/timescale/tiger-cli
maintainer: TigerData <support@tigerdata.com>
description: |-
Tiger CLI - TigerData Cloud Platform CLI
Command-line interface for managing TigerData Cloud Platform resources
license: Apache-2.0
formats:
- deb
- rpm
- apk
bindir: /usr/bin
priority: extra
file_name_template: "{{ .ConventionalFileName }}"
rpm:
group: Unspecified
deb:
lintian_overrides:
- statically-linked-binary
# S3 Blob Storage Configuration
blobs:
# Versioned release artifacts
- provider: s3
bucket: tiger-cli-releases
region: us-east-1
directory: "releases/{{ .Tag }}"
ids:
- archive # Archive ID
- packages # nfpms package ID
# Upload install script and latest version file to bucket root (skip for prereleases)
- provider: s3
bucket: tiger-cli-releases
region: us-east-1
directory: "install"
extra_files_only: true
disable: '{{ ne .Prerelease "" }}' # Skip this step for pre-releases
extra_files:
- glob: ./latest.txt
name_template: "latest.txt"
- glob: ./scripts/install.sh
name_template: "install.sh"
# Homebrew cask configuration
homebrew_casks:
- name: tiger-cli
repository:
owner: timescale
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
homepage: https://github.com/timescale/tiger-cli
description: |-
Tiger CLI - TigerData Cloud Platform CLI
Command-line interface for managing TigerData Cloud Platform resources
binary: tiger
license: Apache-2.0
skip_upload: auto
url:
template: "https://tiger-cli-releases.s3.us-east-1.amazonaws.com/releases/{{ .Tag }}/{{ .ArtifactName }}"
hooks:
# TODO: Sign and notarize instead of removing quarantine bit
# See: https://goreleaser.com/customization/homebrew_casks/#signing-and-notarizing
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/tiger"]
end
# Optional: Add caveats for user instructions
caveats: |
Tiger CLI has been installed successfully!
Get started with:
tiger auth login
For help:
tiger --help
# Checksum configuration - split into individual files for easier validation
checksum:
split: true
changelog:
sort: asc
filters:
exclude:
- "^specs:"
# TODO: Other files that should be ignored
# PackageCloud publisher for Linux packages
publishers:
# Upload all Linux packages (deb, rpm, apk) to PackageCloud
- name: packagecloud
# Skip upload if packagecloud credentials are not set
disable: '{{ eq .Env.PACKAGECLOUD_TOKEN "" }}'
ids:
- packages # Only publish nfpms packages (Linux packages)
cmd: >-
package_cloud push timescale/tiger-cli/{{-
if eq (index (split .ArtifactPath ".") -1) "deb" -}}
any/any
{{- else if eq (index (split .ArtifactPath ".") -1) "rpm" -}}
rpm_any/rpm_any
{{- else if eq (index (split .ArtifactPath ".") -1) "apk" -}}
alpine_any/alpine_any
{{- end }} {{ .ArtifactPath }}
env:
- PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
# Release configuration
release:
github:
owner: timescale
name: tiger-cli
draft: false
prerelease: auto
name_template: "Release {{ .Tag }}"