1# GoReleaser config
2project_name: navidrome
3
4before:
5  hooks:
6    - go-bindata -fs -prefix resources -tags embed -ignore="\\\*.go" -pkg resources -o resources/embedded_gen.go resources/...
7    - go-bindata -fs -prefix ui/build -tags embed -nocompress -pkg assets -o assets/embedded_gen.go ui/build/...
8
9builds:
10  - id: navidrome_linux_amd64
11    env:
12      - CGO_ENABLED=1
13    goos:
14      - linux
15    goarch:
16      - amd64
17    flags:
18      - -tags=embed,netgo
19    ldflags:
20      - "-extldflags '-static -lz'"
21      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
22
23  - id: navidrome_linux_386
24    env:
25      - CGO_ENABLED=1
26    goos:
27      - linux
28    goarch:
29      - 386
30    flags:
31      - -tags=embed,netgo
32    ldflags:
33      - "-extldflags '-static'"
34      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
35
36  - id: navidrome_linux_arm
37    env:
38      - CGO_ENABLED=1
39      - CC=arm-linux-gnueabi-gcc
40      - CXX=arm-linux-gnueabi-g++
41    goos:
42      - linux
43    goarch:
44      - arm
45    goarm:
46      - 5
47      - 6
48      - 7
49    flags:
50      - -tags=embed,netgo
51    ldflags:
52      - "-extldflags '-static'"
53      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
54
55  - id: navidrome_linux_arm64
56    env:
57      - CGO_ENABLED=1
58      - CC=aarch64-linux-gnu-gcc
59      - CXX=aarch64-linux-gnu-g++
60    goos:
61      - linux
62    goarch:
63      - arm64
64    flags:
65      - -tags=embed,netgo
66    ldflags:
67      - "-extldflags '-static'"
68      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
69
70  - id: navidrome_windows_i686
71    env:
72      - CGO_ENABLED=1
73      - CC=i686-w64-mingw32-gcc
74      - CXX=i686-w64-mingw32-g++
75      - PKG_CONFIG_PATH=/mingw32/lib/pkgconfig
76    goos:
77      - windows
78    goarch:
79      - 386
80    flags:
81      - -tags=embed,netgo
82    ldflags:
83      - "-extldflags '-static'"
84      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
85
86  - id: navidrome_windows_x64
87    env:
88      - CGO_ENABLED=1
89      - CC=x86_64-w64-mingw32-gcc
90      - CXX=x86_64-w64-mingw32-g++
91      - PKG_CONFIG_PATH=/mingw64/lib/pkgconfig
92    goos:
93      - windows
94    goarch:
95      - amd64
96    flags:
97      - -tags=embed,netgo
98    ldflags:
99      - "-extldflags '-static'"
100      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
101
102  - id: navidrome_darwin
103    env:
104      - CGO_ENABLED=1
105      - CC=o64-clang
106      - CXX=o64-clang++
107      - PKG_CONFIG_PATH=/darwin/lib/pkgconfig
108    goos:
109      - darwin
110    goarch:
111      - amd64
112    flags:
113      - -tags=embed,netgo
114    ldflags:
115      - -s -w -X github.com/navidrome/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/navidrome/navidrome/consts.gitTag={{.Version}}
116
117archives:
118  - format_overrides:
119      - goos: windows
120        format: zip
121    replacements:
122      darwin: macOS
123      linux: Linux
124      windows: Windows
125      386: i386
126      amd64: x86_64
127
128checksum:
129  name_template: "{{ .ProjectName }}_checksums.txt"
130
131snapshot:
132  name_template: "{{ .Tag }}-SNAPSHOT"
133
134release:
135  draft: true
136
137changelog:
138  # sort: asc
139  filters:
140    exclude:
141      - "^docs:"
142