nonebot2/.github/workflows/release.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2021-12-02 03:17:10 +08:00
name: Release
on:
2021-12-02 03:17:10 +08:00
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
2021-12-02 03:17:10 +08:00
ref: master
token: ${{ secrets.GH_TOKEN }}
- name: Setup Python Environment
uses: ./.github/actions/setup-python
2021-12-02 14:03:06 +08:00
- name: Setup Node Environment
uses: ./.github/actions/setup-node
- name: Build API Doc
uses: ./.github/actions/build-api-doc
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV
- name: Archive Changelog
2022-02-16 11:10:54 +08:00
uses: docker://ghcr.io/nonebot/auto-changelog:master
with:
changelog_file: website/src/pages/changelog.md
archive_regex: '(?<=## )最近更新(?=\n)'
archive_title: ${{ env.TAG_NAME }}
commit_and_push: false
2022-02-16 11:49:45 +08:00
- name: Archive Files
run: |
yarn archive $(poetry version -s)
yarn prettier
2022-02-16 11:49:45 +08:00
- name: Push Tag
2021-12-02 03:17:10 +08:00
run: |
2022-02-16 11:49:45 +08:00
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
2021-12-02 03:17:10 +08:00
git add .
git commit -m ":bookmark: Release $(poetry version -s)"
git tag ${{ env.TAG_NAME }}
2022-01-08 17:47:29 +08:00
git push && git push --tags