forked from go-musicfox/go-musicfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
184 lines (181 loc) · 6.72 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
184
env:
- GO111MODULE=on
- CGO_ENABLED=1
- HOMEBREW_NAME=go-musicfox
builds:
- id: go-musicfox-linux-amd64
main: ./cmd/musicfox.go
binary: musicfox
hooks:
pre:
- apt update && apt install -y libtool gettext libtool-bin
- ./hack/init_linux_env.sh
env:
- BUILD_HOST=x86_64-linux-gnu
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
- CFLAGS=-I/usr/x86_64-linux-gnu/include:$CFLAGS
- CPPFLAGS=-I/usr/x86_64-linux-gnu/include:$CPPFLAGS
- LDFLAGS=-L/usr/x86_64-linux-gnu/lib:$LDFLAGS
- PKG_CONFIG_PATH=/usr/x86_64-linux-gnu/lib/pkgconfig:$PKG_CONFIG_PATH
goarch:
- amd64
goos:
- linux
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
- id: go-musicfox-linux-arm64
main: ./cmd/musicfox.go
binary: musicfox
hooks:
pre:
- apt update && apt install -y libtool gettext libtool-bin
- ./hack/init_linux_env.sh
goarch:
- arm64
goos:
- linux
env:
- BUILD_HOST=aarch64-linux-gnu
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- CFLAGS=-I/usr/aarch64-linux-gnu/include:$CFLAGS
- CPPFLAGS=-I/usr/aarch64-linux-gnu/include:$CPPFLAGS
- LDFLAGS=-L/usr/aarch64-linux-gnu/lib:$LDFLAGS
- PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig:$PKG_CONFIG_PATH
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
- id: go-musicfox-linux-arm
main: ./cmd/musicfox.go
binary: musicfox
hooks:
pre:
- apt update && apt install -y libtool gettext libtool-bin
- ./hack/init_linux_env.sh
goarch:
- arm
goos:
- linux
env:
- BUILD_HOST=arm-linux-gnueabi
- CC=arm-linux-gnueabi-gcc
- CXX=arm-linux-gnueabi-g++
- CFLAGS=-I/usr/arm-linux-gnueabi/include:$CFLAGS
- CPPFLAGS=-I/usr/arm-linux-gnueabi/include:$CPPFLAGS
- LDFLAGS=-L/usr/arm-linux-gnueabi/lib:$LDFLAGS
- PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig:$PKG_CONFIG_PATH
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
- id: go-musicfox-windows-amd64
main: ./cmd/musicfox.go
binary: musicfox
hooks:
pre:
- ./hack/init_windows_env.sh
goarch:
- amd64
goos:
- windows
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
env:
- CC=/usr/local/mingw/bin/x86_64-w64-mingw32-gcc
- CXX=/usr/local/mingw/bin/x86_64-w64-mingw32-g++
- id: go-musicfox-windows-arm64
main: ./cmd/musicfox.go
binary: musicfox
hooks:
pre:
- ./hack/init_windows_env.sh
goarch:
- arm64
goos:
- windows
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
env:
- CC=/usr/local/mingw/bin/aarch64-w64-mingw32-gcc
- CXX=/usr/local/mingw/bin/aarch64-w64-mingw32-g++
- id: go-musicfox-darwin-arm64
main: ./cmd/musicfox.go
binary: musicfox
goarch:
- arm64
goos:
- darwin
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
env:
- CC=oa64-clang
- CXX=oa64-clang++
- id: go-musicfox-darwin-amd64
main: ./cmd/musicfox.go
binary: musicfox
goarch:
- amd64
goos:
- darwin
ldflags:
- -s -w -X github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion={{.Tag}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey={{.Env.LASTFM_KEY}} -X github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret={{.Env.LASTFM_SECRET}}
env:
- CC=o64-clang
- CXX=o64-clang++
archives:
- id: musicfox
builds:
- go-musicfox-linux-amd64
- go-musicfox-linux-arm64
- go-musicfox-linux-arm
- go-musicfox-windows-amd64
- go-musicfox-windows-arm64
- go-musicfox-darwin-amd64
- go-musicfox-darwin-arm64
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
format: zip
files:
- none*
brews:
- name: "{{ .Env.HOMEBREW_NAME }}"
tap:
owner: go-musicfox
name: homebrew-go-musicfox
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
url_template: "https://github.com/go-musicfox/go-musicfox/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
homepage: "https://github.com/go-musicfox/go-musicfox"
description: "go-musicfox是musicfox的重写版,使用Go编写的网易云音乐命令行程序。"
commit_author:
name: anhoder
email: [email protected]
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
dependencies:
- name: terminal-notifier
type: optional
install: |
system 'echo', '-e', "\033[1;33m给个star✨吧~\033[0m \033[4;36mhttps://github.com/go-musicfox/go-musicfox \033[0m"
bin.install 'musicfox'
# goreleaser支持的配置不多,暂时不用
#scoop:
# url_template: "https://github.com/go-musicfox/go-musicfox/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# bucket:
# owner: go-musicfox
# name: go-musicfox
# folder: deploy/scoop
#
# commit_author:
# name: anhoder
# email: [email protected]
#
# commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
# homepage: "https://github.com/go-musicfox/go-musicfox"
# description: "go-musicfox是用Go写的又一款网易云音乐命令行客户端,支持UnblockNeteaseMusic、各种音质级别、lastfm、MPRIS..."
# license: MIT
#
# post_install: ["Write-Host '好用记得给go-musicfox一个star✨哦~'"]
release:
github:
owner: go-musicfox
name: go-musicfox
prerelease: auto
mode: replace
draft: false