Skip to content

Commit 3b0aa88

Browse files
committed
Update gorelease.yaml
1 parent 08a4329 commit 3b0aa88

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
uses: goreleaser/goreleaser-action@v5
2727
with:
2828
version: latest
29-
args: release --rm-dist
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
- main: cmd/main.go
11+
binary: leetcode-tool
12+
ldflags: -s -w -X main.Version={{.Version}} -X main.Commit={{.Commit}} -X main.Date={{ .CommitDate }} -X main.builtBy=goreleaser
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- windows
18+
- darwin
19+
archives:
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+
checksum:
28+
name_template: 'checksums.txt'
29+
snapshot:
30+
name_template: "{{ incpatch .Version }}-next"
31+
changelog:
32+
sort: asc
33+
filters:
34+
exclude:
35+
- '^docs:'
36+
- '^test:'
37+
#brews:
38+
# - tap:
39+
# owner: zcong1993
40+
# name: homebrew-tap
41+
# folder: Formula
42+
# homepage: https://github.com/zcong1993/leetcode-tool
43+
# description: 一个让你更方便刷题的工具
44+
# test: |
45+
# system "#{bin}/leetcode-tool -v"

0 commit comments

Comments
 (0)