From 80e8f9a8a1bba47728ed84de33a014d5384769ab Mon Sep 17 00:00:00 2001 From: Zaki Ali Date: Fri, 23 Aug 2024 18:17:07 -0700 Subject: [PATCH] ci: Add pypi build and release github action --- .github/workflows/pypi_release.yaml | 30 +++++++++++++++++++++++++++++ pyproject.toml | 5 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi_release.yaml diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml new file mode 100644 index 0000000..258d2a1 --- /dev/null +++ b/.github/workflows/pypi_release.yaml @@ -0,0 +1,30 @@ +name: PYPI Release + +on: + push: + branches: + - main + tags: + - 'v*' + +jobs: + pypi_release: + runs-on: ubuntu-latest + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Install UV + run: curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Source Cargo Environment + run: source $HOME/.cargo/env + + - name: Build with UV + run: uvx --from build pyproject-build --installer uv + + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 263eb59..bc1929d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "exchange" +name = "ai-exchange" version = "0.8.0" description = "a uniform python SDK for message generation with LLMs" readme = "README.md" @@ -14,6 +14,9 @@ dependencies = [ "httpx>=0.27.0", ] +[tool.hatch.build.targets.wheel] +packages = ["src/exchange"] + [build-system] requires = ["hatchling"] build-backend = "hatchling.build"