-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.goreleaser.yaml
183 lines (161 loc) · 5.54 KB
/
.goreleaser.yaml
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# https://goreleaser.com
version: 2
project_name: memos
dist: build
builds:
- dir: ./memos
main: ./bin/memos
binary: memos
env:
- CGO_ENABLED=0
- GO111MODULE=on
# Notes on build targets:
# - modernc.org/libc and modernc.org/sqlite have limited architecture support:
# https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures
#
# - For more info refer to: https://go.dev/doc/install/source#environment
goos:
- darwin
- freebsd
- linux
- windows
goarch:
- "386"
- amd64
- arm
- arm64
- ppc64le
- riscv64
- s390x
go386:
- sse2 # Pentium 4/Opteron/Athlon 64 or later
# - softfloat # Pentium MMX or later
goarm:
- "5" # use software floating point; for CPUs without a VFP co-processor
- "6" # use VFPv1 only; usually ARM11 or better cores (VFPv2 or better is also supported)
- "7" # use VFPv3; Cortex-A cores
goamd64:
- v1 # baseline: all x86_64 CPUs
- v2 # CMPXCHG16B, LAHF, SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3 (circa 2009: Intel Nehalem/circa 2013: AMD Jaguar)
- v3 # AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE (circa 2015: Intel Haswell and AMD Excavator)
# - v4 # AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL
goarm64:
- v8.0
# - v9.0
goppc64:
- power8
# - power9
# - power10
goriscv64:
- rva20u64
# - rva22u64
ignore:
- goos: windows
goarch: arm
flags: >-
-trimpath
-tags=timetzdata
ldflags: >-
-s
-w
-X main.Date={{.CommitDate}}
-X github.com/usememos/memos/server/version.Version={{ trimprefix .Version "v" }}
-X github.com/usememos/memos/server/version.DevVersion={{ trimprefix .Version "v" }}
mod_timestamp: "{{ .CommitTimestamp }}"
upx:
# Note:
# - freebsd/*, windows/arm64, */riscv64, */s390x aren't supported by upx
# - Using UPX on Windows may cause false-positives with some antivirus software.
- enabled: true
goos: [linux]
goarch: [arm, arm64, "386", amd64, ppc64le]
compress: "best"
lzma: true
archives:
- format: tar.gz
# this template makes the OS and Arch more compatible with `uname` output.
name_template: >-
{{ .ProjectName }}-{{ .Tag }}-{{- .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}l{{ end -}}
{{- if .Amd64 }}{{- if ne .Amd64 "v1" }}_{{ .Amd64 }}{{ end -}}{{ end -}}
builds_info:
group: root
owner: root
mode: 0644
format_overrides:
- goos: windows
format: zip
changelog:
disable: true
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^refactor:"
- "^style:"
- "^ci:"
- "^perf:"
- "^build:"
gomod:
# Proxy a module from proxy.golang.org, making the builds verifiable.
#
# This will only be effective if running against a tag. Snapshots will ignore this setting.
# Notice: for this to work your `build.main` must be a package, not a `.go` file.
# Can only be enabled on an unaltered repo, since the tag commit must be verifiable and goreleaser demands a clean git state.
proxy: false
# If proxy is true, use these environment variables when running `go mod`
# commands (namely, `go mod tidy`).
#
# Default: `os.Environ()` merged with what you set the root `env` section.
env:
- GOPROXY=https://proxy.golang.org,direct
- GOSUMDB=sum.golang.org
checksum:
disable: false
name_template: "{{ .ProjectName }}-{{ .Tag }}_SHA256SUMS.txt"
algorithm: sha256 # [sha256] sha512 sha1 crc32 md5 sha224 sha384
# Generates a full build, but neither validate anything nor upload it to anywhere.
# goreleaser --snapshot --skip=publish --skip=validate --clean
snapshot:
# Default is `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`.
version_template: "{{ incpatch .Version }}-pre"
#! Due to Goreleaser OSS limitations, nightly releases are created via GH Actions. *
release:
github:
owner: memospot
name: memos-builds
# If set to true, will not auto-publish the release.
draft: false
replace_existing_draft: true
# If set, will create a release discussion in the category specified.
# Warning: do not use categories in the 'Announcement' format.
# discussion_category_name: General
# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will always mark the release as not ready for production.
# Default is false.
prerelease: auto
# If set to false, will NOT mark the release as "latest".
# This prevents it from being shown at the top of the release list,
# and from being returned when calling https://api.github.com/repos/OWNER/REPO/releases/latest.
make_latest: true
# What to do with the release notes in case there the release already exists.
#
# Valid options: [keep-existing] | append | prepend | replace
mode: replace
# Templates: allowed
# header: |
# ## Some title ({{ .Date }})
# Welcome to this new release!
footer: |
[Commit history](https://github.com/usememos/memos/commits/{{ .Tag }}/)
[Compare changes](https://github.com/usememos/memos/compare/{{ .PreviousTag }}...{{ .Tag }})
[Release Changelog](https://github.com/usememos/memos/releases/tag/{{ .Tag }})
[Changelog](https://www.usememos.com/changelog/{{ trimprefix .Tag "v" | replace "." "-" }})
skip_upload: false