This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Improve support for component invocation #3
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 Python Package | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test_and_build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.14.0-rc.2 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.14.0-rc.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Lint | |
| run: uv run ruff check | |
| - name: Check formatting | |
| run: uv run ruff format --check | |
| - name: Type check | |
| run: uv run pyright | |
| - name: Run tests | |
| run: uv run pytest -v | |
| - name: Build | |
| run: uv build | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-packages | |
| path: dist/ | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [test_and_build] | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download distribution packages | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: python-packages | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |