changes for testpypi release #2
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 to TestPyPI | |
| on: | |
| push: | |
| branches: | |
| - main # Trigger on push to the main branch | |
| jobs: | |
| build-and-publish: | |
| name: build and upload release to TestPyPi | |
| runs-on: ubuntu-latest | |
| environment: testpypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up UV | |
| uses: astral-sh/setup-uv@v7.6.0 | |
| with: | |
| version: '0.11.1' # Use the latest Python 3 version | |
| - name: Install Python | |
| run: uv python install 3.11 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Build package with Uv | |
| run: uv build # Build source distribution and wheel | |
| - name: Publish package distributions to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ |