name: Python package build

on: [push, pull_request]
#  release:
#    types: [created]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.8
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install twine flake8
#    - name: Lint with flake8 for syntax errors
#      run: |
#        pip install flake8
#        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
#        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
    - name: Build manylinux Python wheels
      uses: RalfG/python-wheels-manylinux-build@v0.5.0-manylinux2014_x86_64
      with:
        python-versions: 'cp36-cp36m cp37-cp37m'
        build-requirements: 'cython numpy'
    - name: Upload Artifacts
      uses: actions/upload-artifact@v2
      with:
       name: python-wheel-artifact
       path: dist/*
#    - name: Publish wheels to PyPI
#      env:
#        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
#        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
#      run: |
#        twine upload dist/*-manylinux*.whl
