name: build_wheels

on:
  push:
    branches:
      - v[0-9]+.[0-9]+.[x0-9]+
    tags:
      - v*

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

    steps:
      - uses: actions/checkout@v2

      - name: Install Python
        uses: actions/setup-python@v2

      - name: Build wheel
        run: pip install . && pip wheel -w wheelhouse .

      - uses: actions/upload-artifact@v2
        with:
          path: ./wheelhouse/*.whl
