Skip to content

Commit 046559d

Browse files
committed
Handle beta releases draft
1 parent 83d3c6e commit 046559d

3 files changed

Lines changed: 108 additions & 3 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name-template: "v$RESOLVED_VERSION 🚀"
2+
tag-template: "v$RESOLVED_VERSION"
3+
filter-by-commitish: true
4+
exclude-labels:
5+
- "skip-changelog"
6+
version-resolver:
7+
major:
8+
labels:
9+
- "breaking-change"
10+
minor:
11+
labels:
12+
- "enhancement"
13+
default: patch
14+
# Set initial version for v2.x beta releases
15+
version-template: "2.0.0"
16+
categories:
17+
- title: "⚠️ Breaking changes"
18+
label: "breaking-change"
19+
- title: "🚀 Enhancements"
20+
label: "enhancement"
21+
- title: "🐛 Bug Fixes"
22+
label: "bug"
23+
- title: "🔒 Security"
24+
label: "security"
25+
- title: "⚙️ Maintenance/misc"
26+
label:
27+
- "dependencies"
28+
- "maintenance"
29+
- "documentation"
30+
template: |
31+
$CHANGES
32+
33+
Thanks to $CONTRIBUTORS! 🎉
34+
35+
**See full changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
36+
no-changes-template: "Changes are coming soon 😎"
37+
sort-direction: "ascending"
38+
replacers:
39+
- search: "/(?:and )?@meili-bot,?/g"
40+
replace: ""
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name-template: "v$RESOLVED_VERSION 🚀"
2+
tag-template: "v$RESOLVED_VERSION"
3+
filter-by-commitish: true
4+
exclude-labels:
5+
- "skip-changelog"
6+
version-resolver:
7+
major:
8+
labels:
9+
- "breaking-change"
10+
minor:
11+
labels:
12+
- "enhancement"
13+
default: patch
14+
# Set initial version for v2.x releases
15+
version-template: "2.0.0"
16+
categories:
17+
- title: "⚠️ Breaking changes"
18+
label: "breaking-change"
19+
- title: "🚀 Enhancements"
20+
label: "enhancement"
21+
- title: "🐛 Bug Fixes"
22+
label: "bug"
23+
- title: "🔒 Security"
24+
label: "security"
25+
- title: "⚙️ Maintenance/misc"
26+
label:
27+
- "dependencies"
28+
- "maintenance"
29+
- "documentation"
30+
template: |
31+
$CHANGES
32+
33+
Thanks to $CONTRIBUTORS! 🎉
34+
35+
**See full changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
36+
no-changes-template: "Changes are coming soon 😎"
37+
sort-direction: "ascending"
38+
replacers:
39+
- search: "/(?:and )?@meili-bot,?/g"
40+
replace: ""

.github/workflows/release-drafter.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,37 @@ on:
77
- v1.x
88

99
jobs:
10-
update_release_draft:
10+
update_release_draft_v1:
11+
if: github.ref_name == 'v1.x'
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: release-drafter/release-drafter@v6
1415
with:
15-
config-name: ${{ github.ref_name == 'v1.x' && 'release-draft-template-v1.yml' || 'release-draft-template.yml' }}
16-
commitish: ${{ github.ref_name }}
16+
config-name: release-draft-template-v1.yml
17+
commitish: v1.x
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}
20+
21+
update_release_draft_v2_stable:
22+
if: github.ref_name == 'main'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: release-drafter/release-drafter@v6
26+
with:
27+
config-name: release-draft-template-v2-stable.yml
28+
commitish: main
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}
31+
32+
update_release_draft_v2_beta:
33+
if: github.ref_name == 'main'
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: release-drafter/release-drafter@v6
37+
with:
38+
config-name: release-draft-template-v2-beta.yml
39+
commitish: main
40+
prerelease: true
41+
prerelease-identifier: beta
1742
env:
1843
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}

0 commit comments

Comments
 (0)