nonebot2/.github/workflows/release.yml

43 lines
1.1 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@v2
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 Doc
run: poetry run sphinx-build -M markdown ./docs_build ./build
- name: Copy Files
2021-12-02 03:17:10 +08:00
run: cp -r ./build/markdown/* ./website/docs/api/
2021-12-02 03:17:10 +08:00
- name: Archive Files
2021-12-02 14:03:06 +08:00
run: |
yarn prettier
2021-12-02 14:03:06 +08:00
yarn archive $(poetry version -s)
2021-12-02 03:17:10 +08:00
- 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)
2022-01-08 17:47:29 +08:00
git push && git push --tags
2021-12-02 03:17:10 +08:00
poetry build
poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}