build(deps): update typer requirement from >=0.9.0 to >=0.25.1 #17
Workflow file for this run
This file contains hidden or 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 to PyPI | ||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
| inputs: | ||
| pypi_target: | ||
| description: 'PyPI target (pypi or testpypi)' | ||
| default: 'testpypi' | ||
| type: choice | ||
| options: | ||
| - pypi | ||
| - testpypi | ||
| jobs: | ||
| build-and-publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
| - name: Install build deps | ||
| run: | | ||
| pip install build twine | ||
| - name: Lint with ruff | ||
| run: pip install ruff && ruff check src/ --target-version py310 | ||
| - name: Build package | ||
| run: | | ||
| python -m build | ||
| - name: Publish to PyPI | ||
| if: ${{ inputs.pypi_target != 'testpypi' || github.event_name == 'release' }} | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
| run: | | ||
| twine upload dist/* --verbose | ||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| - name: Publish to TestPyPI | ||
| if: ${{ inputs.pypi_target == 'testpypi' }} | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
| run: | | ||
| twine upload --repository testpypi dist/* --verbose | ||