# This is a basic workflow to help you get started with Actions

name: Wheels

on: workflow_dispatch

jobs:
  build_wheels:
    name: Build wheels for ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-python@v2
        name: Install Python
        with:
          python-version: '3.8'

      - name: Setup Miniconda
        uses: conda-incubator/setup-miniconda@v2.1.1
        with:
            python-version: ${{ matrix.python-version }}
            channels: conda-forge
      
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          conda install --file requirements.txt
          pip install -r dev-requirements.txt
          python setup.py install

      - name: Install cibuildwheel
        run: python -m pip install cibuildwheel==1.7.2

      - name: Build wheels
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_SKIP: "cp27-* cp35-* cp36-* cp310-* pp*"  # skip Python 2.7 wheels
          CIBW_BEFORE_BUILD: "rm -rf build/"

      - name: Upload wheels
        run: |
          python -m pip install twine
          python -m twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} ./wheelhouse/*.whl
          

# This is a basic workflow to help you get started with Actions

name: Wheels

on: workflow_dispatch

jobs:
  build_wheels:
    name: Build wheels for ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-python@v2
        name: Install Python
        with:
          python-version: '3.8'

      - name: Setup Miniconda
        uses: conda-incubator/setup-miniconda@v2.1.1
        with:
            python-version: ${{ matrix.python-version }}
            channels: conda-forge
      
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          conda install --file requirements.txt
          pip install -r dev-requirements.txt
          python setup.py install

      - name: Install cibuildwheel
        run: python -m pip install cibuildwheel > 1.7.2

      - name: Build wheels
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_SKIP: "cp27-* cp35-* cp36-* cp310-* pp*"  # skip Python 2.7 wheels
          CIBW_BEFORE_BUILD: "rm -rf build/"

      - name: Upload wheels
        run: |
          python -m pip install twine
          python -m twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} ./wheelhouse/*.whl
          

FIX python wheel building using conda
FIX python wheel building using conda
