Skip to content

Commit 797fb38

Browse files
committed
chore: add release drafter configuration and workflow for automated changelog generation
1 parent ae68e96 commit 797fb38

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

.github/release-drafter.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Release Drafter config (libsql pattern): drafts the next release notes
2+
# as PRs merge into main, resolves the next version from PR labels
3+
# (major/minor/patch), and autolabels PRs from their title prefix.
4+
# Releases are still published manually — this only maintains the draft;
5+
# the existing release.yml workflow handles build + publish on
6+
# `release: published`.
7+
name-template: 'v$RESOLVED_VERSION'
8+
tag-template: 'v$RESOLVED_VERSION'
9+
categories:
10+
- title: '🚀 Features'
11+
labels:
12+
- 'feature'
13+
- 'enhancement'
14+
- title: '🐛 Bug Fixes'
15+
labels:
16+
- 'fix'
17+
- 'bugfix'
18+
- 'bug'
19+
- title: '🧰 Maintenance'
20+
label: 'chore'
21+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
22+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
23+
version-resolver:
24+
major:
25+
labels:
26+
- 'major'
27+
minor:
28+
labels:
29+
- 'minor'
30+
patch:
31+
labels:
32+
- 'patch'
33+
default: patch
34+
template: |
35+
## Changes
36+
37+
$CHANGES
38+
autolabeler:
39+
- label: 'feature'
40+
title:
41+
- '/^feat/i'
42+
- '/^feat:/i'
43+
- label: 'fix'
44+
title:
45+
- '/^fix/i'
46+
- '/^fix:/i'
47+
- '/^bug/i'
48+
- label: 'chore'
49+
title:
50+
- '/^chore/i'
51+
- '/^chore:/i'
52+
- '/^refactor/i'
53+
- '/^docs/i'
54+
- '/^test/i'
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Drafter
2+
3+
# Maintains the next release draft (notes + version resolution) as PRs
4+
# merge into main. Publishing stays manual and is owned by release.yml.
5+
6+
on:
7+
push:
8+
# branches to consider in the event; optional, defaults to all
9+
branches:
10+
- main
11+
# pull_request event is required only for autolabeler
12+
pull_request:
13+
# Only following types are handled by the action, but one can default
14+
# to all as well
15+
types: [opened, reopened, synchronize]
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+
- uses: release-drafter/release-drafter@v5
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)