Skip to content

Commit 0936c96

Browse files
committed
ci: add release configuration and workflow
1 parent a2f07c6 commit 0936c96

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*.*.*'
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version-file: 'go.mod'
21+
- name: Force fetch upstream tags
22+
run: git fetch --tags --force
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v4
25+
with:
26+
version: latest
27+
args: release --clean
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ cover.*
1313
*.test
1414
go.work*
1515

16+
# GoReleaser
17+
dist/
18+
1619
# IDE
1720
.idea/
1821
.vscode/*

.goreleaser.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
project_name: jsonc
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+
skip: 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
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: BREAKING CHANGES
38+
regexp: '^(.*)!:'
39+
order: 0
40+
- title: Features
41+
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
42+
order: 1
43+
- title: 'Bug fixes'
44+
regexp: '^.*?bug(\([[:word:]]+\))??!?:.+$'
45+
order: 2
46+
- title: Others
47+
order: 999
48+
filters:
49+
exclude:
50+
- '^docs(\(.*\))?:'
51+
- '^ci(\(.*\))?:'
52+
- typo

0 commit comments

Comments
 (0)