forked from laetho/metagraf
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.goreleaser.yml
75 lines (67 loc) · 1.57 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
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2
project_name: metaGraf
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
- go vet -v ./...
- go test ./...
builds:
-
binary: mg
dir: mg
goos:
- windows
- darwin
- linux
goarch:
- "amd64"
env:
- CGO_ENABLED=0
ldflags:
- -extldflags '-static'
- -X "github.com/laetho/metagraf/pkg/mgver.GitHash={{ .Env.GITHASH }}"
- -X "github.com/laetho/metagraf/pkg/mgver.GitTag={{ .Env.GITTAG }}"
- -X "github.com/laetho/metagraf/pkg/mgver.GitBranch={{ .Env.GITBRANCH }}"
dockers:
-
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/{{ tolower .Env.GITHUB_REPOSITORY_OWNER}}/mg:latest"
- "ghcr.io/{{ tolower .Env.GITHUB_REPOSITORY_OWNER}}/mg:{{.Version}}"
dockerfile: Dockerfile
use: buildx
skip_push: false
build_flag_templates:
- "--platform=linux/amd64"
archives:
- format: tar.gz
id: mg
name_template: "mg-{{.Version}}-{{.Os}}-{{.Arch}}"
wrap_in_directory: false
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "latest"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- name: metagraf
repository:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER}}"
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TOKEN }}"
install: |
bin.install "mg"