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

View File

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

View File

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