nonebot-bison/.github/workflows/release-trigger.yml
2022-12-03 18:19:46 +08:00

36 lines
969 B
YAML

name: Trigger Release
on:
workflow_dispatch:
jobs:
archive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GH_PAT }}
- name: Setup Python environment
uses: he0119/setup-python@79c04f1e1bcbfe45c9d0eca6aa522e9b364d7dfa
- 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