publish trrex package to TestPyPI #4
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 trrex package to TestPyPI | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| release: | |
| name: release trrex to TestPyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pre-publish | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv build | |
| - name: Smoke test (wheel) | |
| run: uv run --isolated --no-project -p 3.12 --with dist/*.whl pytest tests/test_basic_functions.py | |
| - name: Smoke test (source distribution) | |
| run: uv run --isolated --no-project -p 3.12 --with dist/*.tar.gz pytest tests/test_basic_functions.py | |
| - name: publish package | |
| run: uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always |