Skip to content

Commit cff9945

Browse files
committed
ci: add goreleaser config and release workflow
1 parent cd3a47b commit cff9945

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
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+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- uses: goreleaser/goreleaser-action@v6
24+
with:
25+
version: "~> v2"
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
3+
builds:
4+
- main: ./main.go
5+
binary: cq
6+
env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- darwin
11+
goarch:
12+
- amd64
13+
- arm64
14+
ldflags:
15+
- -s -w -X github.com/tinybluerobots/cq/cmd.Version={{.Version}}
16+
17+
archives:
18+
- format: tar.gz
19+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
20+
21+
checksum:
22+
name_template: checksums.txt
23+
24+
changelog:
25+
sort: asc
26+
filters:
27+
exclude:
28+
- "^docs:"
29+
- "^chore:"
30+
- "^ci:"

0 commit comments

Comments
 (0)