mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 17:15:05 +08:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: master
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Setup Python Environment
|
|
uses: ./.github/actions/setup-python
|
|
|
|
- name: Setup Node Environment
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Build Doc
|
|
run: poetry run sphinx-build -M markdown ./docs_build ./build
|
|
|
|
- name: Copy Files
|
|
run: cp -r ./build/markdown/* ./website/docs/api/
|
|
|
|
- name: Archive Files
|
|
run: |
|
|
yarn prettier
|
|
yarn archive $(poetry version -s)
|
|
|
|
- name: Push Tag and Release to PyPI
|
|
run: |
|
|
git config user.name github-actions
|
|
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 push && git push --tags
|
|
poetry build
|
|
poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}
|