Skip to content

Commit 25ce8cb

Browse files
committed
ci: implement automated release workflow with GoReleaser
- Add GitHub Actions workflow for GoReleaser - Configure GoReleaser to skip builds - Set up changelog groups for features, bug fixes, enhancements, refactors, build process updates, and documentation updates Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 58164d0 commit 25ce8cb

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/goreleaser.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+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: "^1"
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
# either 'goreleaser' (default) or 'goreleaser-pro'
29+
distribution: goreleaser
30+
version: latest
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
builds:
2+
- # If true, skip the build.
3+
# Useful for library projects.
4+
# Default is false
5+
skip: true
6+
7+
changelog:
8+
use: github
9+
groups:
10+
- title: Features
11+
regexp: "^.*feat[(\\w)]*:+.*$"
12+
order: 0
13+
- title: "Bug fixes"
14+
regexp: "^.*fix[(\\w)]*:+.*$"
15+
order: 1
16+
- title: "Enhancements"
17+
regexp: "^.*chore[(\\w)]*:+.*$"
18+
order: 2
19+
- title: "Refactor"
20+
regexp: "^.*refactor[(\\w)]*:+.*$"
21+
order: 3
22+
- title: "Build process updates"
23+
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
24+
order: 4
25+
- title: "Documentation updates"
26+
regexp: ^.*?docs?(\(.+\))??!?:.+$
27+
order: 4
28+
- title: Others

0 commit comments

Comments
 (0)