Skip to content

Commit f83decd

Browse files
committed
ci: update GitHub actions and GoReleaser configuration
- Change single quotes to double quotes in tag specification - Update checkout action from v3 to v4 and rename step - Update setup-go action from v3 to v5 and add `go-version-file` and `check-latest` options - Update GoReleaser action from v4 to v5 and change `args` from `--rm-dist` to `--clean` - Add new `.goreleaser.yaml` configuration file with builds, changelog, and groups configurations Signed-off-by: appleboy <[email protected]>
1 parent 27efe91 commit f83decd

File tree

2 files changed

+66
-12
lines changed

2 files changed

+66
-12
lines changed

.github/workflows/goreleaser.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Goreleaser
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
permissions:
99
contents: write
@@ -12,23 +12,23 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
17-
uses: actions/checkout@v3
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
22-
uses: actions/setup-go@v3
19+
20+
- name: Setup go
21+
uses: actions/setup-go@v5
2322
with:
24-
go-version: 1.17
25-
-
26-
name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v4
23+
go-version-file: go.mod
24+
check-latest: true
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v5
2828
with:
2929
# either 'goreleaser' (default) or 'goreleaser-pro'
3030
distribution: goreleaser
3131
version: latest
32-
args: release --rm-dist
32+
args: release --clean
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
builds:
2+
- # If true, skip the build.
3+
# Useful for library projects.
4+
# Default is false
5+
skip: true
6+
7+
changelog:
8+
# Set it to true if you wish to skip the changelog generation.
9+
# This may result in an empty release notes on GitHub/GitLab/Gitea.
10+
disable: false
11+
12+
# Changelog generation implementation to use.
13+
#
14+
# Valid options are:
15+
# - `git`: uses `git log`;
16+
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
17+
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
18+
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
19+
#
20+
# Defaults to `git`.
21+
use: github
22+
23+
# Sorts the changelog by the commit's messages.
24+
# Could either be asc, desc or empty
25+
# Default is empty
26+
sort: asc
27+
28+
# Group commits messages by given regex and title.
29+
# Order value defines the order of the groups.
30+
# Proving no regex means all commits will be grouped under the default group.
31+
# Groups are disabled when using github-native, as it already groups things by itself.
32+
#
33+
# Default is no groups.
34+
groups:
35+
- title: Features
36+
regexp: "^.*feat[(\\w-)]*:+.*$"
37+
order: 0
38+
- title: "Bug fixes"
39+
regexp: "^.*fix[(\\w-)]*:+.*$"
40+
order: 1
41+
- title: "Enhancements"
42+
regexp: "^.*chore[(\\w-)]*:+.*$"
43+
order: 2
44+
- title: "Refactor"
45+
regexp: "^.*refactor[(\\w-)]*:+.*$"
46+
order: 3
47+
- title: "Build process updates"
48+
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
49+
order: 4
50+
- title: "Documentation updates"
51+
regexp: ^.*?docs?(\(.+\))??!?:.+$
52+
order: 4
53+
- title: Others
54+
order: 999

0 commit comments

Comments
 (0)