Skip to content

Commit 07094ac

Browse files
ci: goreleaser release workflow
1 parent f52ff54 commit 07094ac

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/release.yml

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

.goreleaser.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- id: httpsdev
9+
main: .
10+
binary: httpsdev
11+
env:
12+
- CGO_ENABLED=0
13+
goos: [linux, darwin, windows]
14+
goarch: [amd64, arm64]
15+
ignore:
16+
- goos: windows
17+
goarch: arm64
18+
19+
archives:
20+
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
21+
format_overrides:
22+
- goos: windows
23+
format: zip
24+
25+
checksum:
26+
name_template: "checksums.txt"
27+
28+
changelog:
29+
sort: asc
30+
filters:
31+
exclude:
32+
- "^docs:"
33+
- "^test:"
34+
- "^ci:"
35+
- "^chore:"

0 commit comments

Comments
 (0)