Skip to content

Commit 4ad64c5

Browse files
committed
ci(github): add GoReleaser release workflow on version tag
1 parent 53ba181 commit 4ad64c5

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- id: cortex
9+
main: ./cmd/cortex
10+
binary: cortex
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- windows
16+
- darwin
17+
goarch:
18+
- amd64
19+
- arm64
20+
ldflags:
21+
- -s -w
22+
- -X github.com/hamza-hafeez82/cortex/internal/version.Version={{.Version}}
23+
- -X github.com/hamza-hafeez82/cortex/internal/version.Commit={{.Commit}}
24+
- -X github.com/hamza-hafeez82/cortex/internal/version.Date={{.Date}}
25+
26+
archives:
27+
- id: cortex
28+
name_template: "cortex_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
29+
format_overrides:
30+
- goos: windows
31+
format: zip
32+
files:
33+
- README.md
34+
- LICENSE
35+
36+
checksum:
37+
name_template: "checksums.txt"
38+
39+
changelog:
40+
sort: asc
41+
filters:
42+
exclude:
43+
- "^docs:"
44+
- "^test:"
45+
- "^chore:"
46+
- Merge pull request
47+
- Merge branch
48+
49+
release:
50+
github:
51+
owner: hamza-hafeez82
52+
name: cortex
53+
draft: false
54+
prerelease: auto
55+
name_template: "Cortex {{.Version}}"

0 commit comments

Comments
 (0)