Skip to content

Commit

Permalink
ci: add Release Drafter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hun1er committed Aug 11, 2023
1 parent 5a77469 commit f719240
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 0 deletions.
165 changes: 165 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
autolabeler:
- label: 'breaking'
body:
- '/BREAKING CHANGE: .+/i'
title:
- '/!:/'

- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix: .+/'

- label: 'build'
files:
- '*.cmake'
- '**/cmake/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
branch:
- '/build\/.+/'
title:
- '/build: .+/'

- label: 'chore'
files:
- '.clang-tidy'
- '.cppcheck_suppressions'
- '.gitattributes'
- '.gitignore'
- '*.rc.in'
- 'LICENSE'
branch:
- '/chore\/.+/'
title:
- '/chore: .+/'

- label: 'ci'
files:
- '.github/**'
branch:
- '/ci\/.+/'
title:
- '/ci: .+/'

- label: 'documentation'
files:
- '*.md'
- '*.rst'
- 'docs/**'
branch:
- '/docs\/.+/'
title:
- '/docs: .+/'

- label: 'enhancement'
branch:
- '/feat\/.+/'
title:
- '/feat: .+/'

- label: 'improvement'
branch:
- '/improvement\/.+/'
title:
- '/improvement: .+/'

- label: 'performance'
branch:
- '/perf\/.+/'
title:
- '/perf: .+/'

- label: 'refactoring'
branch:
- '/refactor\/.+/'
title:
- '/refactor: .+/'

- label: 'revert'
branch:
- '/revert\/.+/'
title:
- '/revert: .+/'

- label: 'style'
files:
- '.clang-format'
- '.editorconfig'
branch:
- '/style\/.+/'
title:
- '/style: .+/'

- label: 'tests'
files:
- '**/test/**'
branch:
- '/test\/.+/'
title:
- '/test: .+/'

categories:
- title: ':warning: Breaking changes'
labels:
- 'breaking'

- title: ':rocket: Features'
labels:
- 'enhancement'

- title: ':thumbsup: Improvements'
labels:
- 'improvement'
- 'performance'
- 'refactoring'

- title: ':bug: Bug Fixes'
labels:
- 'bug'

# - title: ':books: Documentation'
# labels:
# - 'documentation'

- title: ':white_check_mark: Tests'
labels:
- 'tests'

- title: ':hammer: Maintenance'
labels:
- 'build'
- 'chore'
- 'ci'
- 'revert'
- 'style'

version-resolver:
major:
labels:
- 'breaking'

minor:
labels:
- 'enhancement'

patch:
labels:
- 'bug'
- 'improvement'
- 'performance'
- 'refactoring'

exclude-labels:
- 'skip-changelog'
33 changes: 33 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Drafter

on:
push:
branches: ["main"]

pull_request:
types: ["opened", "reopened", "synchronize"]

pull_request_target:
types: ["opened", "reopened", "synchronize"]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write

runs-on: "ubuntu-latest"

steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: "release-drafter.yml"
publish: false
prerelease: false
disable-releaser: false
disable-autolabeler: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f719240

Please sign in to comment.