👷 prepare for changelog automation

This commit is contained in:
yanyongyu 2022-02-14 21:54:38 +08:00
parent 8f38fc5795
commit 6ceaf51af7
No known key found for this signature in database
GPG Key ID: 796D8A7FB73396EB
3 changed files with 17 additions and 5 deletions

View File

@ -2,22 +2,31 @@ name: Release Drafter
on:
push:
branches:
- master
tags:
- v*
pull_request_target:
branches:
- master
types:
- closed
jobs:
update-release-draft:
if: github.ref == 'refs/heads/master'
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: release-drafter/release-drafter@v5
id: release-drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TODO
- name: Update Changelog
run: |
echo ${{ steps.release-drafter.outputs.body }}
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
@ -37,7 +46,6 @@ jobs:
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v5
id: release-drafter
with:
name: Release ${{ env.TAG_NAME }} 🌈
tag: ${{ env.TAG_NAME }}

View File

@ -25,6 +25,10 @@ jobs:
- name: Archive Files
run: yarn archive $(poetry version -s)
# TODO
- name: Archive Changelog
run: cat CHANGELOG.md
- name: Push Tag
run: |
git config user.name github-actions

View File

@ -4,7 +4,7 @@ description: Changelog
# 更新日志
## v2.0.0b2
## Latest Changes
- 修复 `receive`, `got` 在参数为空消息时依旧会反复询问
- 修复文档商店分页显示错误