-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
117 lines (109 loc) · 3.94 KB
/
.goreleaser.yaml
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
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need 'go generate'
- go generate ./...
builds:
- id: indev
main: cmd/indev/main.go
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.CommitDate}}
- -X main.builtBy=goreleaser"
- -X github.com/intility/indev/internal/build.Version={{.Version}}
- -X github.com/intility/indev/internal/build.Commit={{.ShortCommit}}
- -X github.com/intility/indev/internal/build.CommitDate={{.CommitDate}}
# telemetry
- -X github.com/intility/indev/internal/build.OTELCollectorEndpoint={{.Env.OTLP_ENDPOINT}}
- -X github.com/intility/indev/internal/build.OTELCollectorToken={{.Env.OTLP_TOKEN}}
- -X github.com/intility/indev/internal/build.SentryDSN={{.Env.SENTRY_DSN}}
# authentication
- -X github.com/intility/indev/internal/build.AuthPlatformAudience={{.Env.AUTH_AUDIENCE}}
- -X github.com/intility/indev/internal/build.AuthAuthority={{.Env.AUTH_AUTHORITY}}
- -X github.com/intility/indev/internal/build.AuthClientID={{.Env.AUTH_CLIENT_ID}}
- -X github.com/intility/indev/internal/build.AuthRedirectURI={{.Env.AUTH_REDIRECT_URI}}
# application
- -X github.com/intility/indev/internal/build.PlatformBaseURI={{.Env.PLATFORM_BASE_URI}}
mod_timestamp: "{{.CommitTimestamp}}"
flags: "-trimpath"
binary: indev
goos:
- linux
- windows
- darwin
release:
github:
owner: intility
name: indev
archives:
- format: tar.gz
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
indev_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE*
- README*
- completions/*
brews:
- name: indev
repository:
owner: intility
name: homebrew-tap
token: "{{ .Env.TAP_REPO_GITHUB_TOKEN }}"
homepage: https://developers.intility.com
description: "A CLI for managing developer platform resources."
goarm: 6
goamd64: v1
directory: Formula
# url_template: https://gitlab.intility.com/api/v4/projects/{{ .Env.CI_PROJECT_ID }}/packages/generic/indev/{{ trimprefix .Tag "v"}}/{{ .ArtifactName }}
url_template: "https://github.com/intility/indev/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
url_headers:
- "Accept: application/octet-stream"
- 'Authorization: bearer #{ENV["DOWNLOADER_GITHUB_TOKEN"]}'
# url_headers:
# - "Authorization: Basic {{ .Env.DOWNLOADER_BASIC_TOKEN }}"
#url_template: "https://gitlab.intility.com/developer-infrastructure/platform-2.0/minato/indev/-/releases/{{ .Tag }}/downloads/{{ .ArtifactName }}"
install: |
bin.install "indev"
bash_completion.install "completions/indev.bash" => "indev"
zsh_completion.install "completions/indev.zsh" => "_indev"
fish_completion.install "completions/indev.fish"
changelog:
sort: asc
groups:
- title: "Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "Bug Fixes"
regexp: '^.*?fix(es)?(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
filters:
exclude:
- "^docs"
- "^test"
- "^ci"
- "^chore"
- "^[Mm]erge.+$"