fix build/release #13
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 | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Check codestyle | |
run: | | |
black --check . | |
isort --check-only -rc . | |
- name: Run tests | |
run: pytest -v tests | |
- name: Build docs | |
run: cd docs && make html | |
- name: Release to PyPI | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $PYPI_TOKEN | |
poetry publish --build |