-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
101 lines (92 loc) · 2.21 KB
/
.goreleaser.yaml
File metadata and controls
101 lines (92 loc) · 2.21 KB
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
version: 2
project_name: MediaWarp
git:
ignore_tags:
- pre-release
snapshot:
version_template: "PreRelease-v{{ incpatch .Version }}-{{ .ShortCommit }}"
release:
name_template: "{{ .Tag }}"
extra_files:
- glob: ./config/config.yaml.example
name_template: config.yaml
- glob: ./LICENSE
before:
hooks:
- go mod download
builds:
- skip: false
env:
- GOPROXY=https://goproxy.io,direct
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- "7"
ignore:
- goos: windows
goarm: 7
binary: "{{ .ProjectName }}"
ldflags:
- -s -w
- -X github.com/AkimioJR/MediaWarp/internal/config.appVersion={{ .Version }}
- -X github.com/AkimioJR/MediaWarp/internal/config.commitHash={{ .FullCommit }}
- -X github.com/AkimioJR/MediaWarp/internal/config.buildDate={{ .Date }}
dockers_v2:
- dockerfile: docker/Dockerfile
build_args:
APP_VERSION: "{{ .Version }}"
COMMIT_HASH: "{{ .FullCommit }}"
BUILD_DATE: "{{ .Date }}"
extra_files:
- go.mod
- go.sum
- main.go
- constants
- internal
- static
- utils
images:
- akimio/mediawarp
tags:
- "{{ .Version }}"
- "{{ if not .IsSnapshot }}latest{{ end }}"
labels:
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.title: "{{ .ProjectName }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.version: "{{ .Version }}"
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
- linux/riscv64
archives:
- formats: [tar.gz]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{- .Os }}_{{ .Arch }}{{- if .Arm}}v{{ .Arm }}{{- end}}"
# 对于 Windows 存档使用 zip 格式
format_overrides:
- goos: windows
formats: [zip]
files:
- src: LICENSE
- src: README.md
- src: config/config.yaml.example
dst: config.yaml.example
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"
- "^ci:"
- "^release:"
- "^issue:"
- "^MediaWarp"