Publish Python π distributions π¦ to PyPI and TestPyPI #25
Workflow file for this run
This file contains hidden or 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 and publish to PyPI | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| name: Build wheels for all supported Python versions | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ${{github.workspace}}/src/pyrad_proc/ | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python (for pip/cibuildwheel) | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install build dependencies | |
| run: python -m pip install build cibuildwheel | |
| - name: Build sdist | |
| run: python -m build --sdist --outdir dist | |
| - name: Build wheels with cibuildwheel | |
| run: python -m cibuildwheel --output-dir dist | |
| env: | |
| CIBW_SKIP: "cp27-* cp36-* cp37-* cp38-* cp39-* pp*" | |
| - name: Publish to PyPI | |
| if: startsWith(github.ref, 'refs/tags') | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |