Skip to content

Commit

Permalink
Merge pull request #1 from monlor/test
Browse files Browse the repository at this point in the history
ci: 🎡 release drafter模板修改
  • Loading branch information
monlor committed Jun 1, 2024
2 parents fe13a5a + 1451786 commit 45342be
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 22 deletions.
39 changes: 28 additions & 11 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 New Features'
- title: '🚀 Features'
labels:
- feature
commit:
- feat
- 'feature'
- 'enhancement'
- 'feat'
- title: '🐛 Bug Fixes'
labels:
- bug
commit:
- fix
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
no-changes-template: 'No significant changes.'
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
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
template: |
## Changes
$CHANGES
37 changes: 26 additions & 11 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,40 @@ name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
types: [closed]
branches:
- main
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
contents: write
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

- name: Release Drafter
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
# Drafts your next Release notes as Pull Requests are merged into "master"
- 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.GITHUB_TOKEN }}

0 comments on commit 45342be

Please sign in to comment.