-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad1353e
commit 85b190a
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
template: $CHANGES | ||
category-template: "### $TITLE" | ||
name-template: "Release v$RESOLVED_VERSION 🌈" | ||
tag-template: "v$RESOLVED_VERSION" | ||
change-template: "- $TITLE [@$AUTHOR](https://github.com/$AUTHOR) ([#$NUMBER]($URL))" | ||
change-title-escapes: '\<&' | ||
exclude-labels: | ||
- "dependencies" | ||
- "skip-changelog" | ||
categories: | ||
- title: "破坏性变更" | ||
labels: | ||
- "Breaking" | ||
- title: "新功能" | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
- title: "Bug 修复" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- title: "文档" | ||
labels: | ||
- "documentation" | ||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
minor: | ||
labels: | ||
- "minor" | ||
patch: | ||
labels: | ||
- "patch" | ||
default: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
jobs: | ||
update-release-drafter: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: pull-request-changelog | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: release-drafter/release-drafter@v5 | ||
id: release-drafter | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update Changelog | ||
uses: docker://ghcr.io/nonebot/auto-changelog:master | ||
with: | ||
latest_changes_position: '# Change Log\n\n' | ||
latest_changes_title: "## 最近更新" | ||
replace_regex: '(?<=## 最近更新\n)[\s\S]*?(?=\n## )' | ||
changelog_body: ${{ steps.release-drafter.outputs.body }} | ||
commit_and_push: false | ||
|
||
- name: Commit and Push | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m ":memo: Update changelog" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Trigger Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
archive: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: Setup Python environment | ||
uses: ./.github/actions/setup-python | ||
|
||
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV | ||
|
||
- name: Archive Changelog | ||
uses: docker://ghcr.io/nonebot/auto-changelog:master | ||
with: | ||
archive_regex: '(?<=## )最近更新(?=\n)' | ||
archive_title: ${{ env.TAG_NAME }} | ||
commit_and_push: false | ||
|
||
- name: Push Tag | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
git add . | ||
git commit -m ":bookmark: Release $(poetry version -s)" | ||
git tag ${{ env.TAG_NAME }} | ||
git push && git push --tags |