Skip to content

Commit 65aec68

Browse files
authored
devx(release-action): Add goreleaser action (#20)
Signed-off-by: Manuel Dewald <manuel.dewald@codesphere.com>
1 parent 3c28b39 commit 65aec68

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

.github/workflows/release.yml

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ cs
2929

3030
# openapi generator
3131
openapitools.json
32+
33+
# goreleaser builds
34+
dist

.goreleaser.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- linux
12+
- windows
13+
- darwin
14+
goarch:
15+
- amd64
16+
- arm64
17+
- arm
18+
main: ./cmd/cs
19+
20+
changelog:
21+
sort: asc
22+
filters:
23+
exclude:
24+
- "^docs"
25+
- "^test"
26+
- "^devx"
27+
- "^chore"
28+
29+
archives:
30+
- formats: binary
31+
32+
release:
33+
footer: >-
34+
35+
---
36+
37+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).

0 commit comments

Comments
 (0)