👷 update changelog ci

This commit is contained in:
yanyongyu
2022-02-15 23:39:04 +08:00
parent cee96d8ab6
commit 962c71ea4e
3 changed files with 15 additions and 9 deletions

View File

@ -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://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/')

View File

@ -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://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