Skip to content

Commit 38c70d6

Browse files
committed
ci: add releases and more tests
1 parent c394394 commit 38c70d6

File tree

5 files changed

+59
-11
lines changed

5 files changed

+59
-11
lines changed

.github/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- octocat
27
categories:
3-
- title: 💥 Breaking changes
8+
- title: Breaking Changes 🛠
49
labels:
5-
- breaking-change
6-
- title: ⚡️ Improvements
10+
- breaking
11+
- title: New Features 🎉
712
labels:
8-
- enhancement
9-
- documentation
10-
- title: 👨‍🔧 Fixes
13+
- feature
14+
- title: Fixes 🔧
1115
labels:
12-
- bugs
13-
- title: 🎨 Other changes
16+
- fix
17+
- title: Other Changes
1418
labels:
1519
- "*"

.github/workflows/bumpversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: "Bump version and create changelog with commitizen"
1313
steps:
1414
- name: Check out
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818
token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
on:
2+
pull_request:
3+
name: conventional-release-labels
4+
jobs:
5+
label:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: bcoe/conventional-release-labels@v1
9+
with:
10+
type_labels: '{"feat": "feature", "fix": "fix", "breaking": "breaking", "ci": "CI"}'

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Release
18+
uses: softprops/action-gh-release@v2
19+
with:
20+
generate_release_notes: true
21+
token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/tests.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ on:
55
pull_request:
66

77
jobs:
8-
build:
8+
test:
99
runs-on: ubuntu-latest
10-
1110
steps:
1211
- uses: actions/checkout@v4
1312
- name: Setup Go
@@ -20,5 +19,19 @@ jobs:
2019
uses: golangci/golangci-lint-action@v6
2120
with:
2221
version: v1.60
22+
- name: Format check
23+
run: test -z "$(go fmt)"
2324
- name: Test
2425
run: go test ./...
26+
lint-commit:
27+
runs-on: ubuntu-latest
28+
name: "Lint commit message"
29+
steps:
30+
- name: Check out
31+
uses: actions/checkout@v4
32+
- name: Install commitizen
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install commitizen
36+
- name: Check commit message
37+
run: cz check --rev-range HEAD

0 commit comments

Comments
 (0)