diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2d4bd747..8e92058a 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,37 +1,31 @@ -header: | - ### Documentation - - See: https://v2.nonebot.dev -template: | - ### 💫 Changes - - $CHANGES +template: $CHANGES category-template: "### $TITLE" name-template: "Release v$RESOLVED_VERSION 🌈" tag-template: "v$RESOLVED_VERSION" -change-template: "- $TITLE @$AUTHOR (#$NUMBER)" -change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +change-template: "- $TITLE [@$AUTHOR](https://github.com/$AUTHOR) ([#$NUMBER]($URL))" +change-title-escapes: '\<&' categories: - - title: "💥 Breaking Changes" + - title: "💥 破坏性变更" labels: - "Breaking" - - title: "🚀 Features" + - title: "🚀 新功能" labels: - "feature" - "enhancement" - - title: "🐛 Bug Fixes" + - title: "🐛 Bug 修复" labels: - "fix" - "bugfix" - "bug" - - title: "📝 Documentation" + - title: "📝 文档" labels: - "documentation" - - title: "🍻 Plugin Publish" + - title: "💫 杂项" + - title: "🍻 插件发布" label: "Plugin" - - title: "🍻 Bot Publish" + - title: "🍻 机器人发布" label: "Bot" - - title: "🍻 Adapter Publish" + - title: "🍻 适配器发布" label: "Adapter" version-resolver: major: diff --git a/.github/workflows/publish-bot.yml b/.github/workflows/publish-bot.yml index 82f683d9..390b9338 100644 --- a/.github/workflows/publish-bot.yml +++ b/.github/workflows/publish-bot.yml @@ -20,7 +20,7 @@ jobs: token: ${{ secrets.GH_TOKEN }} - name: NoneBot2 Publish Bot - uses: nonebot/nonebot2-publish-bot@main + uses: docker://ghcr.io/nonebot/nonebot2-publish-bot:main with: token: ${{ secrets.GH_TOKEN }} config: > diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f431c65d..8ec1912e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -22,10 +22,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # TODO - # - name: Update Changelog - # run: | - # echo ${{ steps.release-drafter.outputs.body }} + - name: Update Changelog + uses: docker://ghcr.io/nonebot/auto-changelog:master + with: + changelog_file: website/src/pages/changelog.md + latest_changes_position: '# 更新日志\n\n' + changelog_body: ${{ steps.release-drafter.outputs.body }} release: if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35328f4a..ecc4cfc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,13 @@ jobs: - name: Archive Files run: yarn archive $(poetry version -s) - # TODO + - run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV + - name: Archive Changelog - run: cat CHANGELOG.md + uses: docker://ghcr.io/nonebot/auto-changelog:master + with: + changelog_file: website/src/pages/changelog.md + archive_title: ${{ env.TAG_NAME }} - name: Push Tag run: | @@ -35,5 +39,5 @@ jobs: git config user.email github-actions@github.com git add . git commit -m ":bookmark: Release $(poetry version -s)" - git tag v$(poetry version -s) + git tag ${{ env.TAG_NAME }} git push && git push --tags diff --git a/website/src/pages/changelog.md b/website/src/pages/changelog.md index 59cd13b6..77729197 100644 --- a/website/src/pages/changelog.md +++ b/website/src/pages/changelog.md @@ -4,7 +4,7 @@ description: Changelog # 更新日志 -## Latest Changes +## v2.0.0-beta.2 - 修复 `receive`, `got` 在参数为空消息时依旧会反复询问 - 修复文档商店分页显示错误 @@ -17,7 +17,7 @@ description: Changelog - 调整项目结构,分离内部定义与用户接口 - 新增 Bot 连接事件钩子 (如 `driver.on_bot_connect` ) 的依赖注入 -## v2.0.0b1 +## v2.0.0-beta.1 - 新增 `MessageTemplate` 对于 `str` 普通模板的支持 - 移除插件加载的 `NameSpace` 模式