-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
114 lines (104 loc) · 3.01 KB
/
Copy path.goreleaser.yaml
File metadata and controls
114 lines (104 loc) · 3.01 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
version: 2
project_name: rc
# Baked into the release binary (via the build ldflags below) so `rc setup google`
# works with no env setup. Sourced from CI secrets; empty for local builds, where
# the RC_GOOGLE_CLIENT_ID / --client-id runtime override still works.
env:
- GOOGLE_OAUTH_CLIENT_ID={{ if isEnvSet "GOOGLE_OAUTH_CLIENT_ID" }}{{ .Env.GOOGLE_OAUTH_CLIENT_ID }}{{ end }}
- GOOGLE_OAUTH_CLIENT_SECRET={{ if isEnvSet "GOOGLE_OAUTH_CLIENT_SECRET" }}{{ .Env.GOOGLE_OAUTH_CLIENT_SECRET }}{{ end }}
before:
hooks:
# just check the deps are intact; don't run `go mod tidy`, which could
# rewrite go.mod/go.sum during the release and ship different deps than CI tested.
- go mod verify
builds:
- id: rc-unix-windows
main: ./cmd/rc
binary: rc
env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}}
- -X github.com/revenuecat/cli/internal/google.DefaultClientID={{ .Env.GOOGLE_OAUTH_CLIENT_ID }}
- -X github.com/revenuecat/cli/internal/google.DefaultClientSecret={{ .Env.GOOGLE_OAUTH_CLIENT_SECRET }}
- id: rc-darwin
main: ./cmd/rc
binary: rc
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}}
- -X github.com/revenuecat/cli/internal/google.DefaultClientID={{ .Env.GOOGLE_OAUTH_CLIENT_ID }}
- -X github.com/revenuecat/cli/internal/google.DefaultClientSecret={{ .Env.GOOGLE_OAUTH_CLIENT_SECRET }}
archives:
- id: default
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
formats: [zip]
checksum:
name_template: "checksums.txt"
# Sign checksums.txt (it hashes every binary, so one signature covers the whole
# release) so downloads can be verified. Signing uses CI's GitHub identity, no keys.
signs:
- cmd: cosign
artifacts: checksum
output: true
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- "--yes"
- "--bundle=${signature}"
- "${artifact}"
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: git
groups:
- title: "New features"
regexp: '^feat'
order: 0
- title: "Bug fixes"
regexp: '^fix'
order: 1
- title: "Performance"
regexp: '^perf'
order: 2
- title: "Other"
order: 999
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- '^ci:'
- '^style:'
- 'Co-Authored-By:'
brews:
- name: rc
repository:
owner: RevenueCat
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
homepage: "https://www.revenuecat.com"
description: "RevenueCat command line interface"
license: "MIT"
install: |
bin.install "rc"
bin.install_symlink "rc" => "revenuecat"
test: |
system "#{bin}/rc", "--version"
system "#{bin}/revenuecat", "--version"