Build and Publish Wheels #1
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 Wheels | |
| on: | |
| # push: | |
| # tags: | |
| # - "v*.*.*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Version tag to use (e.g. v1.2.3)' | |
| required: true | |
| default: '' | |
| jobs: | |
| build_wheels: | |
| name: Build Universal Wheel | |
| runs-on: windows-2019 | |
| steps: | |
| - name: Check Out Repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Update pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel setuptools build toml | |
| - name: Build universal wheel | |
| run: | | |
| python -m build | |
| - name: Upload wheel as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel | |
| path: dist/*.whl | |
| publish: | |
| name: Publish to PyPI | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download wheel artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wheel | |
| path: dist | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |