Skip to content

Commit

Permalink
add release-drafter support
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Feb 4, 2024
1 parent c700397 commit 5e8751a
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name-template: 'v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: '💥 Breaking Changes'
label: 'kind/breaking'
- title: '🚀 Features'
labels:
- 'kind/feature'
- title: '🎯 Improvements'
labels:
- 'kind/improvement'
- title: '🐛 Bug Fixes'
labels:
- 'kind/bug'
- title: '🧰 Maintenance'
labels:
- 'area/tech-debt'
- 'area/ci'
- title: '📝 Documentation'
labels:
- 'area/docs'
- 'kind/docs'
- title: '⬆️ Dependencies'
labels:
- 'dependencies'
collapse-after: 5

change-template: '- $TITLE (#$NUMBER)'
sort-by: title
sort-direction: ascending
change-title-escapes: '\<*_&#@`' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-template: '$COMPLETE'
no-changes-template: 'This release contains minor changes and bugfixes.'
template: |
# Release v$NEXT_MINOR_VERSION
## What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$NEXT_MINOR_VERSION
## New Contributors
$CONTRIBUTORS
🎉 **Thanks to all contributors helping with this release!** 🎉
# replacers:
# - search: '/@(qclaogui|dependabot(?:\[bot\])?)(?:,| |$)/gm'
# replace: ''

exclude-labels:
- 'skip-release-notes'
- 'skip-changelog'

exclude-contributors:
- 'dependabot[bot]'

29 changes: 29 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Drafter

# this workflow will run when someone labeled a pull request that targets branch is main
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
name: Trigger a draft release update
permissions:
# write permission is required to create a github release
contents: write
pull-requests: read # required to read PR titles/labels
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.QCBOT_TOKEN }}

0 comments on commit 5e8751a

Please sign in to comment.