From 35af83b4a50abf737903bd469e709e6b5d2ef065 Mon Sep 17 00:00:00 2001 From: Richard Abrich Date: Tue, 3 Mar 2026 22:46:03 -0500 Subject: [PATCH] ci: add PyPI publish and test workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trusted publisher (OIDC) — no tokens needed. Tag with vX.Y.Z to publish. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/publish.yml | 18 ++++++++++++++++++ .github/workflows/test.yml | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7cf12b6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,18 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v4 + - run: uv build + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..919515d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,16 @@ +name: test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v4 + - run: uv sync --extra dev + - run: uv run pytest