Skip to content

Commit 56041de

Browse files
committed
basic goreleaser setup
1 parent a16290b commit 56041de

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ src/build/
1919
*.db
2020
/data/
2121
test-coverage.out
22+
dist/
23+
scratch/
2224

2325
# executables
2426
/goat
@@ -27,3 +29,4 @@ test-coverage.out
2729
!.gitignore
2830
!.github/
2931
!.golangci.yaml
32+
!.goreleaser.yaml

.goreleaser.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
3+
project_name: "goat"
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
17+
archives:
18+
- formats: [tar.gz]
19+
# this name template makes the OS and Arch compatible with the results of `uname`.
20+
name_template: >-
21+
{{ .ProjectName }}_
22+
{{- title .Os }}_
23+
{{- if eq .Arch "amd64" }}x86_64
24+
{{- else if eq .Arch "386" }}i386
25+
{{- else }}{{ .Arch }}{{ end }}
26+
{{- if .Arm }}v{{ .Arm }}{{ end }}
27+
# use zip for windows archives
28+
format_overrides:
29+
- goos: windows
30+
formats: [zip]
31+
32+
changelog:
33+
sort: asc
34+
filters:
35+
exclude:
36+
- "^docs:"
37+
- "^test:"
38+
39+
signs:
40+
- artifacts: checksum
41+
42+
release:
43+
footer: >-
44+
45+
---
46+
47+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).

0 commit comments

Comments
 (0)