Skip to content

Commit

Permalink
ci: 添加 Release Drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Apr 8, 2023
1 parent 62190a3 commit d8f0c97
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
template: $CHANGES
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
exclude-labels:
- "dependencies"
- "skip-changelog"
autolabeler:
- label: "bug"
branch:
- '/fix\/.+/'
- label: "change"
branch:
- '/change\/.+/'
- label: "enhancement"
branch:
- '/feature\/.+/'
- '/feat\/.+/'
- '/improve\/.+/'
- label: "ci"
files:
- .github/**/*
- label: "breaking-change"
title:
- "/.+!:.+/"
categories:
- title: 💥 破坏性变更
labels:
- breaking-change
- title: 🚀 新功能
labels:
- enhancement
- title: 🐛 Bug 修复
labels:
- bug
- title: 💫 杂项
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
17 changes: 17 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
name: Update Release Draft
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d8f0c97

Please sign in to comment.