From f1604690aa3f18e76a17dc457dcc6cb42841629a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 14 May 2025 15:06:40 +0300 Subject: Add workflow --- .github/workflows/build-test-publish.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build-test-publish.yml 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 }} -- cgit v1.3