Skip to content

Commit d3dfb40

Browse files
committed
ci: bring more automation
- Enable release-drafter GitHub Action to automatically draft a new release based on the commit messages. - renovatebot: use central configuration file Signed-off-by: Flavio Castelli <[email protected]>
1 parent 662d57c commit d3dfb40

File tree

3 files changed

+112
-4
lines changed

3 files changed

+112
-4
lines changed

.github/release-drafter.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
categories:
2+
- title: "⚠️ Breaking changes"
3+
labels:
4+
- "kind/major"
5+
- "kind/breaking-change"
6+
- title: "🚀 Features"
7+
labels:
8+
- "kind/enhancement"
9+
- "kind/feature"
10+
- title: "🐛 Bug Fixes"
11+
labels:
12+
- "kind/bug"
13+
- title: "🧰 Maintenance"
14+
labels:
15+
- "kind/chore"
16+
- "area/dependencies"
17+
18+
exclude-labels:
19+
- duplicate
20+
- invalid
21+
- later
22+
- wontfix
23+
- kind/question
24+
- release/skip-changelog
25+
26+
change-template: "- $TITLE (#$NUMBER)"
27+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
28+
name-template: "v$RESOLVED_VERSION"
29+
template: |
30+
$CHANGES
31+
32+
autolabeler:
33+
# Tag any PR with "!" in the subject as major update. In other words, breaking change
34+
- label: "kind/breaking-change"
35+
title: "/.*!:.*/"
36+
- label: "area/dependencies"
37+
title: "chore(deps)"
38+
- label: "area/dependencies"
39+
title: "fix(deps)"
40+
- label: "area/dependencies"
41+
title: "build(deps)"
42+
- label: "kind/feature"
43+
title: "feat"
44+
- label: "kind/bug"
45+
title: "fix"
46+
- label: "kind/chore"
47+
title: "chore"
48+
49+
version-resolver:
50+
major:
51+
labels:
52+
- "kind/major"
53+
- "kind/breaking-change"
54+
minor:
55+
labels:
56+
- "kind/minor"
57+
- "kind/feature"
58+
- "kind/enhancement"
59+
patch:
60+
labels:
61+
- "kind/patch"
62+
- "kind/fix"
63+
- "kind/bug"
64+
- "kind/chore"
65+
- "area/dependencies"
66+
default: patch

.github/workflows/release-drafter.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Drafter
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
# branches to consider in the event; optional, defaults to all
7+
branches:
8+
- main
9+
# pull_request event is required only for autolabeler
10+
pull_request:
11+
# Only following types are handled by the action, but one can default to all as well
12+
types: [opened, reopened, synchronize, edited]
13+
# pull_request_target event is required for autolabeler to support PRs from forks
14+
pull_request_target:
15+
types: [opened, reopened, synchronize, edited]
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
update_release_draft:
22+
permissions:
23+
# write permission is required to create a github release
24+
contents: write
25+
# write permission is required for autolabeler
26+
# otherwise, read permission is required at least
27+
pull-requests: write
28+
runs-on: ubuntu-latest
29+
steps:
30+
# Drafts your next Release notes as Pull Requests are merged into "master"
31+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
32+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
33+
# with:
34+
# config-name: my-config.yml
35+
# disable-autolabeler: true
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

renovate.json

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"extends": [
3-
"config:base",
4-
"group:allNonMajor",
5-
"schedule:earlyMondays"
3+
"github>kubewarden/github-actions//renovate-config/policies"
64
],
7-
"labels": ["dependencies"]
5+
"packageRules": [
6+
{
7+
"description": "Update GitHub Actions",
8+
"matchManagers": ["github-actions"],
9+
"groupName": "github-actions",
10+
"groupSlug": "github-actions"
11+
}
12+
]
813
}

0 commit comments

Comments
 (0)