Skip to content

Commit 9dfaa69

Browse files
committed
ci: add GitHub Actions workflow and GoReleaser configuration for automated releases
1 parent 859a8b8 commit 9dfaa69

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.23.5"
22+
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
version: latest
27+
args: release --clean
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
project_name: cachex
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- id: cachex
9+
main: ./cmd/cachex
10+
binary: cachex
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- windows
16+
- darwin
17+
- freebsd
18+
goarch:
19+
- amd64
20+
- arm64
21+
22+
checksum:
23+
name_template: '{{ .ProjectName }}_checksums.txt'
24+
25+
changelog:
26+
sort: asc
27+
filters:
28+
exclude:
29+
- '^docs:'
30+
- '^test:'
31+
32+
archives:
33+
-
34+
formats: [ binary ]
35+
name_template: "{{ .Binary}}.{{ .Os }}.{{ .Arch }}"
36+
37+
release:
38+
github:
39+
owner: ayuxdev
40+
name: cachex

0 commit comments

Comments
 (0)