Skip to content

Commit fccc484

Browse files
committed
ci: Start using conventional commits
1 parent deebab9 commit fccc484

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

.cz.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tool.commitizen]
2+
name = "cz_conventional_commits"
3+
version = "1.0.6"
4+
tag_format = "v$version"

.github/workflows/bump.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bump
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
8+
ci:
9+
uses: ./.github/workflows/ci.yml
10+
11+
bump:
12+
runs-on: ubuntu-latest
13+
14+
needs:
15+
- ci
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
ssh-key: "${{ secrets.DEPLOY_SSH_KEY }}"
22+
- run: pip3 install Commitizen==2.27.1
23+
24+
- run: git config --local user.email "[email protected]"
25+
- run: git config --local user.name "github-actions"
26+
27+
- run: cz bump --changelog
28+
29+
- run: git push
30+
- run: git push --tags

.github/workflows/main.yml renamed to .github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- main
10+
workflow_call:
1011

1112

1213
jobs:
@@ -25,3 +26,14 @@ jobs:
2526
run: go build -v
2627
- name: go test
2728
run: go test -test.v -race -cover
29+
30+
conventional-commits:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
37+
- run: pip3 install -U Commitizen
38+
# The commit hash here is that of the commit where we started using conventional commits.
39+
- run: cz check --rev-range deebab92..HEAD

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,15 @@ case *MyError:
8484
var me MyError
8585
ok := errors.As(err, &me)
8686
```
87+
88+
## Contributing
89+
90+
Do you think you have found a bug? Then please report it via the Github issue tracker. Make sure to
91+
attach any problematic files that can be used to reproduce the issue. Such files are also used to
92+
create regression tests that ensure that your bug will never return.
93+
94+
When submitting pull requests, please prefix your commit messages with `fix:` or `feat:` for bug
95+
fixes and new features respectively. This is the
96+
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) scheme that is used to
97+
automate some maintenance chores such as generating the changelog and inferring the next version
98+
number.

0 commit comments

Comments
 (0)