forked from go-musicfox/go-musicfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
130 lines (127 loc) · 4.26 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
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 libasound2-dev libflac-dev gobjc++-mingw-w64 gobjc
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
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
# binary: musicfox
# hooks:
# pre:
# - apt update
# - apt install -y gobjc++-mingw-w64 gobjc
# goarch:
# - arm64
# goos:
# - linux
# env:
# - CC=aarch64-linux-gnu-gcc
# - CXX=aarch64-linux-gnu-g++
- id: go-musicfox-windows-amd64
main: ./cmd/musicfox.go
binary: musicfox
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=x86_64-w64-mingw32-gcc
- CXX=x86_64-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-windows-amd64
- 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: anhoder@88.com
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: anhoder@88.com
#
# 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