Release PyPI #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release PyPI | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: set release version | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.8" | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y | |
poetry source add pypi | |
poetry lock --no-update | |
- name: build docs | |
run: | | |
poetry install --with docs | |
python3 docs/build.py | |
- name: Deploy docs | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/_build/html | |
- name: Publish | |
run: | | |
poetry version ${{ github.event.inputs.version }} | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
poetry build && poetry publish |