Update and add package metadata. #5
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: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| - name: Install Python 3.14 | |
| run: | | |
| sudo add-apt-repository ppa:deadsnakes/nightly | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends python3.14-dev python3.14-venv | |
| python3.14 -m pip install --upgrade pip setuptools | |
| python3.14 -m venv $HOME/venv-python3.14 | |
| uv sync | |
| - name: Run tests | |
| run: | | |
| uv run pytest tests examples | |
| - name: Build | |
| run: | | |
| uv run python -m hatchling 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@v4 | |
| with: | |
| name: python-packages | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |