This repository has been archived by the owner on Nov 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.goreleaser.yml
126 lines (110 loc) · 3.68 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# For more about how to configure goreleaser, see:
# https://goreleaser.com/customization/
#
# To release:
# - Set the GITHUB_TOKEN environment variable
# - Tag a commit with a release, such as 'v0.2.0'
# - Push the tag
# - Run `goreleaser release` from the root of the repo.
# - Follow the link which is printed to edit the draft release, then publish the
# release. Ensure that the "pre-release" checkbox is **unchecked** so that it
# will be published as an official release, which the bootstrap.sh script's
# "latest" release fetching depends on.
#
# NOTE: goreleaser will release to the github repo which is set
# as the 'origin' remote.
#
# See https://goreleaser.com/release/ for more details.
before:
hooks:
# you may remove this if you don't use vgo
- env GO111MODULE=on go mod tidy
- make clean
builds:
# You can have multiple builds defined as a yaml list
-
# ID of the build.
# Defaults to the project name.
id: "trace"
# Path to main.go file or main package.
# Default is `.`.
main: ./cmd/trace/main.go
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
#
# Putting the binary in a folder allows us to put some documentation
# in the archive root, while also extracting all binary files into
# the destination directory in a single command.
binary: "bin/kubectl-crossplane-trace"
# Custom environment variables to be set during the builds.
# Default is empty.
env:
- CGO_ENABLED=0
- GO111MODULE=on
goarch:
- amd64
- id: "pack"
main: ./cmd/pack/main.go
binary: "bin/kubectl-crossplane-pack"
env:
- CGO_ENABLED=0
- GO111MODULE=on
goarch:
- amd64
archives:
-
# ID of this archive.
# Defaults to `default`.
id: "crossplane-cli"
# Builds reference which build instances should be archived in this archive.
builds:
- trace
- pack
# Archive name template.
# Defaults:
# - if format is `tar.gz`, `gz` or `zip`:
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
# - if format is `binary`:
# - `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
#
# We use the tag directly here so that the archive name matches the tag, which means it
# also matches the paths for the commands which are bash scripts.
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
# Set to true, if you want all files in the archive to be in a single directory.
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
# you get a folder 'goreleaser_Linux_arm64'.
# If set to false, all files are extracted separately.
# You can also set it to a custom folder name (templating is supported).
# Default is false.
# wrap_in_directory: true
# Archive format. Valid options are `tar.gz`, `gz`, `zip` and `binary`.
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
# Default is `tar.gz`.
format: "tar.gz"
# 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
# goreleaser will bundle other things into our archive for us, so we're using
# that functionality to bundle our bash scripts into the archive.
files:
- bin/kubectl-crossplane*
- LICENSE
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^test:'
- '^Merge pull request'
release:
# If set to true, will not auto-publish the release.
# Default is false.
draft: true