-
Notifications
You must be signed in to change notification settings - Fork 4
/
.goreleaser.yml
67 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
project_name: plat-pkg
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- GO111MODULE=on
- GOPROXY=https://goproxy.io,direct
- GOPRIVATE=github.com/jinmukeji/*
before:
hooks:
# - go mod download
- make generate
- make format
- make lint
# - make test
builds:
- id: "jm-micro"
binary: jm-micro
main: ./jm-micro
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
flags:
- -v
# go1.13
- -trimpath
asmflags:
# use go build -trimpath instead for go1.13
# - all=-trimpath={{.Env.PWD}}
gcflags:
# use go build -trimpath instead for go1.13
# - all=-trimpath={{.Env.PWD}}
ldflags:
- >-
-s -w
-X main.Version={{.Version}}
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
dockers:
- goos: linux
goarch: amd64
binaries:
- jm-micro
# Templates of the Docker image names.
image_templates:
- "949191617935.dkr.ecr.cn-north-1.amazonaws.com.cn/jm-app/jm-micro:latest"
- "949191617935.dkr.ecr.cn-north-1.amazonaws.com.cn/jm-app/jm-micro:{{ .Tag }}"
- "949191617935.dkr.ecr.cn-north-1.amazonaws.com.cn/jm-app/jm-micro:v{{ .Major }}.{{ .Minor }}"
dockerfile: jm-micro/Dockerfile
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-{{.ShortCommit}}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'