Skip to content

v2.1.9

v2.1.9 #17

Workflow file for this run

name: publish
on:
release:
types: [released, prereleased]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Caching pip packages
uses: actions/cache@v3
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`)
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Installing pip dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install mypy flake8 pytest
python -m pip install setuptools build twine
continue-on-error: false
- name: Linting
run: |
flake8 src
flake8 tests
- name: Checking static types
run: mypy src
- name: Generating clickgen `stubfile`
run: make stubgen
- name: Building
run: python -m build
continue-on-error: false
- uses: actions/upload-artifact@master
if: success()
with:
name: dist
path: dist
- name: Testing
run: |
python -m pip install dist/clickgen-*.tar.gz
python -m pytest
continue-on-error: false
- name: Publishing to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine --version
twine upload dist/*