crfsuite 0.3.0

Safe wrapper of crfsuite
Documentation
on: [push, pull_request]

name: Python

jobs:
  build:
    name: Build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        python-version: [3.8]
    steps:
      - uses: actions/checkout@v2
      - name: Checkout submodules
        shell: bash
        run: |
            auth_header="$(git config --local --get http.https://github.com/.extraheader)"
            git submodule sync --recursive
            git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
      - name: Set up Python
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Display Python version
        run: python -c "import sys; print(sys.version)"
      - name: Build manylinux2010 wheels
        if: matrix.os == 'ubuntu-latest'
        run: |
            docker run --rm -v `pwd`:/io -w /io quay.io/pypa/manylinux2010_x86_64 sh manylinux.sh
            docker run --rm -v `pwd`:/io -w /io quay.io/pypa/manylinux2010_i686 sh manylinux.sh
            ls -lrth dist/
      - name: Build Non-Linux wheels
        if: matrix.os != 'ubuntu-latest'
        shell: bash
        run: |
            pip install wheel
            python setup.py sdist bdist_wheel
            ls -lrth dist/
      - name: Publish Non-Linux package
        if: matrix.os != 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
        run: |
            pip install twine
            TWINE_USERNAME=__token__ TWINE_PASSWORD=${{ secrets.pypi_password }} twine upload --skip-existing dist/*
      - name: Publish manylinux2010 package
        if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.pypi_password }}
          skip_existing: true