v0.1.14 #35
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
| # This workflow publishes the package to PyPI on merge to main | |
| name: Publish to PyPI | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| publish-to-testpypi: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Required for trusted publishing | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/qtype | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Build package | |
| run: | | |
| # Use the release tag as the version | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| uv version "$VERSION" | |
| uv build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |