-
Notifications
You must be signed in to change notification settings - Fork 219
/
.goreleaser.2.yml
84 lines (75 loc) · 2.23 KB
/
.goreleaser.2.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
# This config targets the new flypkgs distribution system. Once all releases are
# being served by flypkgs, this file will replace .goreleaser.yml and .goreleaser.dev.yml
env:
- BUILD_ENV={{if index .Env "BUILD_ENV"}}{{.Env.BUILD_ENV}}{{else}}production{{end}}
before:
hooks:
- go mod download
- go generate ./...
builds:
- id: linux
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- arm64
- amd64
ldflags:
- -X github.com/superfly/flyctl/internal/buildinfo.buildDate={{.CommitDate}}
- -X github.com/superfly/flyctl/internal/buildinfo.buildVersion={{.Version}}
- -X github.com/superfly/flyctl/internal/buildinfo.commit={{.ShortCommit}}
tags:
- "{{.Env.BUILD_ENV}}"
- id: macos
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- arm64
- amd64
ldflags:
- -X github.com/superfly/flyctl/internal/buildinfo.buildDate={{.CommitDate}}
- -X github.com/superfly/flyctl/internal/buildinfo.buildVersion={{.Version}}
- -X github.com/superfly/flyctl/internal/buildinfo.commit={{.ShortCommit}}
tags:
- "{{.Env.BUILD_ENV}}"
- id: windows
env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- arm64
- amd64
ldflags:
- -X github.com/superfly/flyctl/internal/buildinfo.buildDate={{.CommitDate}}
- -X github.com/superfly/flyctl/internal/buildinfo.buildVersion={{.Version}}
- -X github.com/superfly/flyctl/internal/buildinfo.commit={{.ShortCommit}}
tags:
- "{{.Env.BUILD_ENV}}"
archives:
- id: linux
name_template: >-
{{ .ProjectName }}_{{ .Version }}_Linux_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
builds: [linux]
files: [only-the-binary*]
wrap_in_directory: false
format: tar.gz
- id: macos
name_template: >-
{{ .ProjectName }}_{{ .Version }}_macOS_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
builds: [macos]
files: [only-the-binary*]
wrap_in_directory: false
format: tar.gz
- id: windows
name_template: >-
{{ .ProjectName }}_{{ .Version }}_Windows_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
builds: [windows]
files: [wintun.dll]
wrap_in_directory: false
format: zip
release:
disable: true