Skip to content

Commit c0d9d4c

Browse files
committed
update goreleaser config
1 parent a2a5f0b commit c0d9d4c

File tree

2 files changed

+39
-30
lines changed

2 files changed

+39
-30
lines changed

.gitignore

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,17 @@
2121
go.work
2222

2323
# IDE directories
24-
/.idea
25-
/.vscode
26-
27-
# Taskfile directory
28-
/.task
24+
.idea/
25+
.vscode/
2926

3027
# asdf config
31-
/.tool-versions
28+
.tool-versions
3229

3330
# tls config
34-
/tls
31+
tls/
3532

36-
# binaries
37-
/bin
38-
/goserve
39-
/goserve.exe
33+
# builds
34+
bin/
35+
dist/
36+
goserve
37+
goserve.exe

.goreleaser.yaml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
version: 2
2-
archives:
3-
- id: goserve
4-
builds:
5-
- goserve
6-
files:
7-
- "bin/*"
8-
changelog:
9-
use: github-native
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
107
builds:
11-
- id: goserve
12-
binary: goserve
13-
flags:
14-
- -trimpath
15-
ldflags:
16-
- -s -w -extldflags '-static' -X 'github.com/cmgsj/goserve/pkg/cmd/goserve.version={{.Version}}'
8+
- env:
9+
- CGO_ENABLED=0
10+
1711
goos:
1812
- darwin
1913
- linux
2014
- windows
21-
goarch:
22-
- amd64
23-
- arm64
24-
env:
25-
- CGO_ENABLED=0
15+
16+
flags:
17+
- -trimpath
18+
19+
ldflags:
20+
- -s -w -extldflags '-static' -X 'github.com/cmgsj/goserve/pkg/cmd/goserve.version={{.Version}}'
21+
22+
archives:
23+
- formats: [tar.gz]
24+
name_template: >-
25+
{{ .ProjectName }}_
26+
{{- title .Os }}_
27+
{{- if eq .Arch "amd64" }}x86_64
28+
{{- else if eq .Arch "386" }}i386
29+
{{- else }}{{ .Arch }}{{ end }}
30+
{{- if .Arm }}v{{ .Arm }}{{ end }}
31+
format_overrides:
32+
- goos: windows
33+
formats: [zip]
34+
35+
changelog:
36+
use: github-native

0 commit comments

Comments
 (0)