-
Notifications
You must be signed in to change notification settings - Fork 4
/
.goreleaser.yml
89 lines (77 loc) · 2.42 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
project_name: kosli
before:
hooks:
- go mod tidy
builds:
- id: kosli
binary: kosli
ldflags:
- -w -s
- -X github.com/kosli-dev/cli/internal/version.version={{ .Tag }}
- -X github.com/kosli-dev/cli/internal/version.gitCommit={{ .FullCommit }}
- -X github.com/kosli-dev/cli/internal/version.gitTreeState=clean
- -extldflags "-static"
env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
- arm
main: ./cmd/kosli/
archives:
-
# Can be used to change the archive formats for specific GOOSs.
# Most common use case is to archive as zip on Windows.
# Default is empty.
format_overrides:
- goos: windows
format: zip
# docs for nfpm can be found here: https://goreleaser.com/customization/nfpm/
nfpms:
- id: kosli
# You can change the file name of the package.
#
# Default:`{{ .PackageName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}`
file_name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
builds:
- kosli
vendor: Kosli Inc.
homepage: https://kosli.com/
maintainer: Mike Long <[email protected]>
description: CLI client for reporting compliance events to https://kosli.com
license: MIT
# Formats to be generated.
formats:
- deb
- rpm
# Template to the path that the binaries should be installed.
# Defaults to `/usr/bin`.
bindir: /usr/bin
# Section.
section: misc
# Priority.
priority: optional
# Contents to add to the package.
# GoReleaser will automatically add the binaries.
contents:
# The src and dst attributes also supports name templates
- src: dist/{{ .ProjectName }}_{{ .Os }}_{{ if .Amd64 }}{{ .Arch }}_v1{{ else if .Arm }}{{ .Arch }}_6{{ else }}{{ .Arch }}{{ end }}/kosli
dst: /usr/local/bin/kosli
publishers:
- name: fury.io
# by specifying `packages` id here goreleaser will only use this publisher
# with artifacts identified by this id
ids:
- kosli
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/kosli/