Workflow file for this run
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: Publish Python Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.2 | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Install | |
run: poetry install --with tests | |
- name: Run Pytest | |
run: poetry run pytest | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [ tests ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Build package | |
run: poetry build | |
- name: Publish package | |
run: poetry publish | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} |