Skip to content

Commit 66156d1

Browse files
committed
ci: configure GitHub Actions workflow for Goreleaser integration
- Add a new GitHub workflow file for Goreleaser - Set up the Goreleaser project name in the configuration file - Configure build settings to skip the build process if needed - Customize the changelog generation settings in the configuration file Signed-off-by: appleboy <[email protected]>
1 parent fda6e47 commit 66156d1

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

.github/workflows/goreleaser.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: "^1"
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v5
25+
with:
26+
# either 'goreleaser' (default) or 'goreleaser-pro'
27+
distribution: goreleaser
28+
version: latest
29+
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

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

0 commit comments

Comments
 (0)