Skip to content

Commit e180469

Browse files
committed
Update releasing setup
1 parent 257333c commit e180469

2 files changed

Lines changed: 78 additions & 43 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, windows-latest, macos-latest]
14-
go-version: ['1.19', '1.20', '1.21']
14+
go-version: ['1.26']
1515
runs-on: ${{ matrix.os }}
1616
steps:
1717
- name: Checkout
@@ -36,7 +36,7 @@ jobs:
3636
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
3737

3838
- name: Upload coverage to Codecov
39-
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.21'
39+
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.26'
4040
uses: codecov/codecov-action@v4
4141
with:
4242
file: ./coverage.out
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set up Go
5353
uses: actions/setup-go@v5
5454
with:
55-
go-version: '1.21'
55+
go-version: '1.26'
5656
cache: true
5757

5858
- name: Run golangci-lint
@@ -70,7 +70,7 @@ jobs:
7070
- name: Set up Go
7171
uses: actions/setup-go@v5
7272
with:
73-
go-version: '1.21'
73+
go-version: '1.26'
7474
cache: true
7575

7676
- name: Build

.goreleaser.yaml

Lines changed: 74 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# GoReleaser v2 configuration
33
version: 2
44

5+
project_name: bdcli
6+
57
# Before hook - runs before the build
68
before:
79
hooks:
@@ -21,41 +23,39 @@ builds:
2123
goarch:
2224
- amd64
2325
- arm64
24-
- arm
25-
- '386'
26-
goarm:
27-
- '6'
28-
- '7'
29-
ignore:
30-
- goos: darwin
31-
goarch: '386'
32-
- goos: darwin
33-
goarch: arm
3426
ldflags:
3527
- -s -w
3628
- -X main.version={{.Version}}
3729
- -X main.commit={{.Commit}}
3830
- -X main.date={{.Date}}
3931
mod_timestamp: '{{ .CommitTimestamp }}'
4032

33+
# Our binaries are small, so we can skip UPX compression
34+
# to save time and avoid potential issues with antivirus software.
35+
# upx:
36+
# - enabled: true
37+
# compress: best
38+
# lzma: true
39+
# brute: true
40+
4141
archives:
4242
- id: default
43-
format: tar.gz
44-
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
43+
formats: ["tar.gz"]
44+
# name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
4545
format_overrides:
4646
- goos: windows
47-
format: zip
47+
formats: ["zip"]
4848
files:
4949
- LICENSE
5050
- README.md
5151

5252
checksum:
53-
name_template: 'bdcli_checksums.txt'
54-
algorithm: sha256
53+
name_template: "bdcli_checksums.txt"
5554

5655
snapshot:
5756
version_template: "{{ incpatch .Version }}-next"
5857

58+
5959
changelog:
6060
sort: asc
6161
use: github
@@ -73,12 +73,10 @@ changelog:
7373
- title: 'Bug Fixes'
7474
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
7575
order: 1
76-
- title: 'Performance Improvements'
77-
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
78-
order: 2
7976
- title: 'Others'
8077
order: 999
8178

79+
8280
release:
8381
draft: true
8482
replace_existing_draft: true
@@ -88,27 +86,64 @@ release:
8886
header: |
8987
## BetterDiscord CLI {{ .Tag }}
9088
91-
Install with npm: `npm install -g @betterdiscord/cli@{{ .Version }}`
89+
Install on Windows with winget: `winget install betterdiscord.cli`
90+
Install on Mac/Linux with brew: `brew install betterdiscord/tap/bdcli`
9291
footer: |
9392
**Full Changelog**: https://github.com/BetterDiscord/cli/compare/{{ .PreviousTag }}...{{ .Tag }}
9493
95-
# NPM publishing via go-npm
96-
nfpms:
97-
- id: packages
98-
package_name: betterdiscord-cli
99-
vendor: BetterDiscord
100-
homepage: https://betterdiscord.app/
101-
maintainer: BetterDiscord Team
102-
description: A cross-platform CLI for managing BetterDiscord
103-
license: Apache-2.0
104-
formats:
105-
- deb
106-
- rpm
107-
- apk
108-
bindir: /usr/bin
109-
contents:
110-
- src: LICENSE
111-
dst: /usr/share/doc/betterdiscord-cli/LICENSE
94+
---
95+
96+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
97+
98+
99+
homebrew_casks:
100+
- name: bdcli
101+
description: "A cross-platform CLI for managing BetterDiscord."
102+
homepage: "https://betterdiscord.app/"
103+
license: "Apache-2.0"
104+
binaries: [bdcli]
105+
commit_author:
106+
name: zerebos
107+
email: 6865942+zerebos@users.noreply.github.com
108+
repository:
109+
owner: BetterDiscord
110+
name: homebrew-tap
111+
branch: bdcli-{{ .Tag }}-{{ .Now.Format "20060102150405"}}
112+
token: "{{ .Env.GH_PAT }}"
113+
114+
115+
winget:
116+
- name: BetterDiscord CLI
117+
package_identifier: betterdiscord.cli
118+
author: BetterDiscord
119+
release_notes: "{{ .Changelog }}"
120+
release_notes_url: https://github.com/BetterDiscord/cli/releases/tag/{{ .Tag }}
121+
publisher: "BetterDiscord"
122+
publisher_url: "https://github.com/BetterDiscord"
123+
publisher_support_url: "https://github.com/BetterDiscord/cli/issues"
124+
license: "Apache-2.0"
125+
license_url: "https://github.com/BetterDiscord/cli/blob/main/LICENSE"
126+
127+
short_description: "A cross-platform CLI for managing BetterDiscord."
128+
homepage: "https://betterdiscord.app/"
129+
tags: [cli, discord, utility, betterdiscord]
130+
131+
url_template: "https://github.com/BetterDiscord/cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
132+
commit_author:
133+
name: zerebos
134+
email: 6865942+zerebos@users.noreply.github.com
135+
repository:
136+
owner: betterdiscord
137+
name: winget-pkgs
138+
branch: bdcli-{{ .Tag }}-{{ .Now.Format "20060102150405"}}
139+
token: "{{ .Env.GH_PAT }}"
140+
pull_request:
141+
enabled: true
142+
base:
143+
owner: microsoft
144+
name: winget-pkgs
145+
branch: master
146+
draft: false
112147

113148
chocolateys:
114149
- name: betterdiscordcli
@@ -121,17 +156,17 @@ chocolateys:
121156
copyright: 2025 BetterDiscord Limited
122157
license_url: https://github.com/BetterDiscord/cli/blob/main/LICENSE
123158
project_source_url: https://github.com/BetterDiscord/cli
124-
docs_url: https://github.com/BetterDiscord/cli/wiki
159+
docs_url: https://docs.betterdiscord.app/
125160
bug_tracker_url: https://github.com/BetterDiscord/cli/issues
126161
tags: "betterdiscord cli discord"
127162
summary: A cross-platform CLI for managing BetterDiscord
128163
description: |
129164
A cross-platform CLI for managing BetterDiscord.
130165
Provides commands to install, uninstall, and manage BetterDiscord on your system.
131166
release_notes: "https://github.com/BetterDiscord/cli/releases/tag/v{{ .Version }}"
132-
skip_publish: true
133167

134-
# Git configuration
168+
169+
135170
git:
136171
ignore_tags:
137172
- 'nightly'

0 commit comments

Comments
 (0)