name: Build and Publish to PyPI (macOS) # on: push # disabled on push cuz Error: Container action is only supported on Linux # no solution found yet on: workflow_dispatch jobs: build-n-publish: # name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI name: Build and publish Python 🐍 distributions 📦 to PyPI # runs-on: ubuntu-22.04 runs-on: macos-latest strategy: matrix: python-version: ["3.6", "3.7", "3.8", "3.9"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install pypa/build run: >- python -m pip install build --user - name: Build a binary wheel and a source tarball run: >- python -m build --sdist --wheel --outdir dist/ . - name: Publish distribution 📦 to PyPI # if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }}