looser type hint Real|float for checker. #1
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: Build package and push to PyPi | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PYTHON: 3.12 | |
POETRY_HOME: "~/poetry" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Includes getting tags | |
- name: Set up python ${{ env.PYTHON }} | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON }} | |
- name: Cache Poetry Install | |
uses: actions/cache@v4 | |
id: cached-poetry | |
with: | |
path: ${{ env.POETRY_HOME }} | |
key: poetry-cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.github/workflows/deploy.yaml') }} | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
- name: Add Poetry to PATH # Needs to be separate from install-poetry because cache. | |
run: | | |
echo "$POETRY_HOME/bin" >> $GITHUB_PATH | |
- name: Configure Poetry # Needs to be separate from install-poetry because cache. | |
run: | | |
poetry self add poetry-dynamic-versioning[plugin] | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: Cache venv | |
uses: actions/cache@v4 | |
id: cached-venv | |
with: | |
path: .venv/ | |
key: venv-cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.github/workflows/deploy.yaml') }} | |
- name: Install project | |
run: poetry install --no-interaction | |
- name: Build package | |
run: poetry build | |
- name: Publish package | |
if: github.event_name != 'workflow_dispatch' | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
poetry publish | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: dist | |
path: dist/ |