diff options
| -rw-r--r-- | .github/workflows/build-test-publish.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml new file mode 100644 index 0000000..d0f5073 --- /dev/null +++ b/.github/workflows/build-test-publish.yml @@ -0,0 +1,38 @@ +name: Test, Build, and Publish + +on: + push: + branches: + - main + pull_request: + branches: + - "**" + +jobs: + test-build-publish: + runs-on: ubuntu-latest + name: Test, Build and Publish + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install uv + run: pip install uv + + - name: Run tests + run: python test.py + + - name: Build package + run: uv build + + - name: Publish to PyPI + if: github.ref == 'refs/heads/main' + run: uv publish + env: + UV_PYPI_TOKEN: ${{ secrets.UV_PYPI_TOKEN }} |
