Fixes #124 #80
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: CICD | |
on: | |
push: | |
pull_request: | |
types: [opened] | |
workflow_dispatch: | |
release: | |
types: [created] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'poetry' | |
- run: make install | |
- run: make precommit | |
docs: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'poetry' | |
- run: make install | |
- run: make docs | |
- run: make pushdocs | |
if: | | |
github.event_name == 'release' || github.ref == 'refs/heads/master' | |
build_and_publish: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'poetry' | |
- run: make install | |
- run: make build | |
- name: Publish | |
run: make publish | |
if: github.event_name == 'release' | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |