Skip to content

Commit 1d6ec8f

Browse files
ci: setup release management with labeler and release-drafter (#18)
* ci: add release-drafter configuration * ci: add labeler configuration and workflow
1 parent ee1b5ae commit 1d6ec8f

File tree

5 files changed

+90
-0
lines changed

5 files changed

+90
-0
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: 2
22
updates:
33
- package-ecosystem: github-actions
44
directory: /
5+
labels:
6+
- "maintenance"
57
schedule:
68
interval: weekly
79
groups:
@@ -12,6 +14,8 @@ updates:
1214

1315
- package-ecosystem: npm
1416
directory: /
17+
labels:
18+
- "maintenance"
1519
schedule:
1620
interval: weekly
1721
groups:

.github/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Configuration for GitHub Actions labeler v5
2+
# See: https://github.com/actions/labeler
3+
4+
documentation:
5+
- changed-files:
6+
- any-glob-to-any-file: ["**/*.md"]
7+
8+
maintenance:
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
[".github/**/*", "package.json", "package-lock.json"]
12+
13+
enhancement:
14+
- changed-files:
15+
- any-glob-to-any-file: ["src/**/*", "dist/**/*", "action.yml"]

.github/release-drafter.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "🚀 Features and Improvements"
5+
labels:
6+
- "enhancement"
7+
- title: "🐛 Bug Fixes"
8+
labels:
9+
- "bug"
10+
- title: "🧰 Maintenance"
11+
labels:
12+
- "maintenance"
13+
- title: "📚 Documentation"
14+
labels:
15+
- "documentation"
16+
change-template: "- $TITLE (#$NUMBER)"
17+
version-resolver:
18+
major:
19+
labels:
20+
- "bump-major"
21+
- "breaking"
22+
minor:
23+
labels:
24+
- "bump-minor"
25+
- "enhancement"
26+
default: patch
27+
template: |
28+
## What's Changed
29+
$CHANGES
30+
31+
exclude-labels:
32+
- "skip-release-notes"

.github/workflows/labeler.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Pull Request Labeler
2+
on:
3+
pull_request_target:
4+
types: [opened, synchronize, reopened]
5+
6+
jobs:
7+
label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
steps:
13+
- uses: actions/labeler@v5
14+
with:
15+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
16+
sync-labels: true

.github/workflows/release-drafter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write # to create a github release
11+
pull-requests: read
12+
13+
jobs:
14+
update_release_draft:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Update Release Draft
21+
uses: release-drafter/release-drafter@v6
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)