-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
55 lines (50 loc) · 1.92 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
# Use the following command for local testing (only creates binaries in local dist/ directory)
#
# go install github.com/goreleaser/goreleaser/v2@latest
# APP_VERSION=latest
# APP_BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%S') ˜
# APP_COMMIT=$(git log -1 --pretty=format:%h) \
# goreleaser build --clean --skip-validate --snapshot
#
# add --single-target to build for current GOOS / GOARCH only
#
# Why is there a _v1 suffix on amd64 builds?
# Go 1.18 introduced the GOAMD64 option, and v1 is the default value for that option.
#
# • building binary=dist/rubin_linux_amd64_v1/app
# • building binary=dist/rubin_darwin_arm64/app
# • building binary=dist/rubin_darwin_amd64_v1/app
# • building binary=dist/rubin_linux_arm64/app
before:
hooks:
- go mod tidy
gomod:
proxy: true
# Fields: https://goreleaser.com/customization/builds/
# Multiple binaries: https://github.com/orgs/goreleaser/discussions/3169#discussioncomment-2989473
builds:
- id: billy-idle
env:
- CGO_ENABLED=0
goos: [darwin] # no linux since currently only macOS is supported
goarch: [amd64,arm64]
goamd64: [v1]
# Custom ldflags (linker flags)
#
# default according to go-releaser source-code (internal/builders/golang/build.go):
# build.Ldflags = []string{"-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser"
# see also https://goreleaser.com/cookbooks/using-main.version/
#
#ldflags:
# example for classes != main:
# -s -w -X github.com/tillkuhn/rubin/cmd.Version={{.Env.RUBIN_VERSION}} -X github.com/tillkuhn/rubin/cmd.Commit={{.Env.RUBIN_COMMIT}} -X github.com/tillkuhn/rubin/cmd.BuildDate={{.Env.rubin_BUILD_DATE}}
# Path to main.go file or main package.
# Notice: when used with `gomod.proxy`, this must be a package.
#
# Default is `.`
# main: ./cmd/rubin
binary: billy
archives:
- format: zip
files:
- none*