v0.12.0 #70
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: Publish on PyPI | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| release: | |
| types: [created] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install the latest version of uv and set the python version | |
| uses: astral-sh/setup-uv@v7.3.1 | |
| with: | |
| python-version: "3.12" | |
| - name: Build wheel | |
| run: | | |
| uv build | |
| # Smoke test the build for packaging errors | |
| - name: Smoke test (wheel) | |
| run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py | |
| - name: Smoke test (source distribution) | |
| run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py | |
| - name: Upload build for publishing | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: parxy_release | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: dist/* | |
| pypi: | |
| name: Upload release to PyPI | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Install the latest version of uv and set the python version | |
| uses: astral-sh/setup-uv@v7.3.1 | |
| if: github.event_name == 'release' | |
| with: | |
| enable-cache: false | |
| ignore-empty-workdir: true | |
| python-version: "3.12" | |
| - name: Download build | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: parxy_release | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| if: github.event_name == 'release' | |
| run: uv publish |