Skip to content

Commit 521930a

Browse files
committed
Add release automation and CI/CD setup
Configure GitHub Actions and GoReleaser for automated cross-platform binary releases.
1 parent f53ffe9 commit 521930a

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/release.yml

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

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ go.work
2525
go.work.sum
2626

2727
# env file
28+
.envrc
2829
.env
2930

3031
# Editor/IDE
3132
# .idea/
3233
# .vscode/
34+
35+
.claude/
36+
elasticache-token
37+
dist

.goreleaser.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is an example goreleaser.yaml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
version: 2
4+
before:
5+
hooks:
6+
- go mod download
7+
builds:
8+
-
9+
env:
10+
- CGO_ENABLED=0
11+
main: ./cmd/elasticache-token/main.go
12+
flags:
13+
- -trimpath
14+
goarch:
15+
- amd64
16+
- arm64
17+
goos:
18+
- darwin
19+
- linux
20+
checksum:
21+
name_template: 'checksums.txt'
22+
snapshot:
23+
name_template: "{{ .Tag }}-next"
24+
changelog:
25+
sort: asc
26+
filters:
27+
exclude:
28+
- '^docs:'
29+
- '^test:'
30+
release:
31+
prerelease: auto

0 commit comments

Comments
 (0)