Skip to content

Commit 0a002c6

Browse files
committed
Add GoReleaser GitHub Actions workflow
- Create release.yml workflow for automated releases - Trigger on version tags (v*.*.*) - Use goreleaser-action v6 with GoReleaser v2 - Configure proper permissions for GitHub releases - Upload release artifacts for archival
1 parent 140076d commit 0a002c6

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
goreleaser:
14+
name: GoReleaser
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Required for changelog generation
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: '1.25'
26+
27+
- name: Run GoReleaser
28+
uses: goreleaser/goreleaser-action@v6
29+
with:
30+
distribution: goreleaser
31+
version: '~> v2'
32+
args: release --clean
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Upload artifacts
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: release-artifacts
41+
path: |
42+
dist/*.tar.gz
43+
dist/*.zip
44+
dist/checksums.txt
45+
retention-days: 5

0 commit comments

Comments
 (0)