Skip to content

Commit 857feb1

Browse files
committed
ci: add release workflow
Triggers goreleaser on v* tag push; produces linux/amd64 + linux/arm64 tarballs and a draft GitHub release (.goreleaser.yaml sets draft:true).
1 parent faa7423 commit 857feb1

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
# Fires when a tag like v0.1.0 / v1.2.3 is pushed. Cross-compiles linux/amd64
4+
# + linux/arm64 via goreleaser, attaches them to a DRAFT GitHub release
5+
# (because `.goreleaser.yaml` sets `release.draft: true`) — review and
6+
# Publish in the GitHub UI when ready.
7+
8+
on:
9+
push:
10+
tags:
11+
- 'v*'
12+
13+
permissions:
14+
contents: write # goreleaser creates the GitHub release + uploads artifacts
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # goreleaser needs the full history for changelog
23+
24+
- uses: actions/setup-go@v5
25+
with:
26+
go-version: '1.26'
27+
28+
- uses: goreleaser/goreleaser-action@v6
29+
with:
30+
version: latest
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)