Fix many pylint warnings, update copyright to 2024 #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: | | |
git fetch --prune --unshallow --tags -f | |
echo exit code $? | |
git tag --list | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.13.0 | |
env: | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: | | |
git fetch --prune --unshallow --tags -f | |
echo exit code $? | |
git tag --list | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Build sdist | |
run: pip install numpy && python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
# upload to PyPI on every tag starting with 'v' | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
# alternatively, to publish when a GitHub Release is created, use the following rule: | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: claudiodsf | |
password: ${{ secrets.pypi_password }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |