Skip to content

Commit fb2d15b

Browse files
committed
feat(ci): release using goreleaser
1 parent d5e71ba commit fb2d15b

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*.*.*
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-go@v4
18+
with:
19+
go-version: ^1
20+
- uses: actions/cache@v3
21+
with:
22+
path: ~/go/pkg/mod
23+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24+
restore-keys: |
25+
${{ runner.os }}-go-
26+
- uses: docker/setup-qemu-action@v3
27+
- uses: docker/setup-buildx-action@v3
28+
- uses: goreleaser/goreleaser-action@v5
29+
with:
30+
version: latest
31+
distribution: goreleaser
32+
args: release --rm-dist
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
36+
SCOOP_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
37+
AUR_KEY: ${{ secrets.AUR_KEY }}

.goreleaser.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- skip: true
9+
10+
changelog:
11+
sort: asc
12+
use: github
13+
filters:
14+
exclude:
15+
- "^test:"
16+
- "^chore"
17+
- "merge conflict"
18+
- Merge pull request
19+
- Merge remote-tracking branch
20+
- Merge branch
21+
- go mod tidy
22+
groups:
23+
- title: Dependency updates
24+
regexp: "^.*feat\\(deps\\)*:+.*$"
25+
order: 300
26+
- title: "New Features"
27+
regexp: "^.*feat[(\\w)]*:+.*$"
28+
order: 100
29+
- title: "Bug fixes"
30+
regexp: "^.*fix[(\\w)]*:+.*$"
31+
order: 200
32+
- title: "Documentation updates"
33+
regexp: "^.*docs[(\\w)]*:+.*$"
34+
order: 400
35+
- title: Other work
36+
order: 9999

0 commit comments

Comments
 (0)