Skip to content

build fixes (#10)

build fixes (#10) #16

name: Build
on: push
jobs:
build-n-publish:
name: Test, build and publish
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Dependencies
run: |
pip install wheel setuptools rstcheck
- name: Test
run: |
python setup.py test
- name: Test readme
run: |
rstcheck README.rst
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
if: startsWith(github.event.ref, 'refs/tags') && matrix.python-version == '3.7'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}