From 6e144d3657080b1bdab1b7f9c070306342989413 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 16 Feb 2020 23:20:38 -0800 Subject: [PATCH] Use Github Actions to build macOS wheels For 3.5+ on the latest macOS version. --- .github/workflows/build-macos-wheels.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build-macos-wheels.yml diff --git a/.github/workflows/build-macos-wheels.yml b/.github/workflows/build-macos-wheels.yml new file mode 100644 index 0000000..f2ab16e --- /dev/null +++ b/.github/workflows/build-macos-wheels.yml @@ -0,0 +1,33 @@ +name: Build macOS wheels + +on: [push] + +jobs: + build: + + runs-on: macos-latest + strategy: + matrix: + # macOS apparently doesn't support 3.4 + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Build wheels + run: | + python -m pip install --upgrade pip wheel setuptools + pip wheel . -w dist/ + ls dist/ + - name: Publish package to PyPI + # Only actually publish if a new tag was pushed + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + # We can't use the pypa action because of https://github.com/pypa/gh-action-pypi-publish/issues/15 + run: | + pip install twine + TWINE_USERNAME="__token__" \ + TWINE_PASSWORD="${{ secrets.pypi_password }}" \ + twine upload dist/*