Skip to content

Commit 4d77ad5

Browse files
committed
ci: Add goreleaser release workflow and .goreleaser.yml config file
1 parent e7494c8 commit 4d77ad5

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: GoReleaser
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+
-
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+
with:
24+
go-version: 1.23
25+
-
26+
name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v6
28+
with:
29+
distribution: goreleaser
30+
version: '~> v2'
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
project_name: openapi-cli
2+
builds:
3+
- env:
4+
- CGO_ENABLED=0
5+
goos:
6+
- linux
7+
- windows
8+
- darwin
9+
goarch:
10+
- amd64
11+
- arm64
12+
13+
archives:
14+
- format: binary
15+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
16+
checksum:
17+
name_template: 'checksums.txt'
18+
changelog:
19+
sort: asc

0 commit comments

Comments
 (0)