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