mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
36 lines
986 B
YAML
36 lines
986 B
YAML
name: Trigger Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
archive:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Setup Python environment
|
|
uses: ./.github/actions/setup-python
|
|
|
|
- run: echo "TAG_NAME=v$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)" >> $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 ${{ env.TAG_NAME }}"
|
|
git tag ${{ env.TAG_NAME }}
|
|
git push && git push --tags
|