diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml new file mode 100644 index 0000000..2c5815a --- /dev/null +++ b/.github/workflows/distribute.yml @@ -0,0 +1,54 @@ +name: distribute-PyPI + +permissions: + contents: read + +on: + push: + tags: ["v*"] + workflow_dispatch: + +jobs: + + test: + uses: ./.github/workflows/ci.yml + secrets: inherit + build: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + + - name: Set up Python + run: uv python install 3.12 + + - name: Build sdist and wheel + run: uv build + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + environment: pypi + permissions: + id-token: write + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 3ff8c1f..9b3d050 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [project] name = "anyiostream" version = "0.1.0" +authors = [ + { name = "randy", email = "hotung1027@gmail.com" }, +] description = "Composable async pipelines with structured concurrency — built on anyio, inspired by aiostream and Rust's Result type." readme = "README.md" requires-python = ">=3.12" license = { text = "Apache-2.0" } -authors = [ - { name = "randyt" }, -] keywords = [ "async", "pipeline", @@ -16,7 +16,6 @@ keywords = [ "concurrency", "structured-concurrency", "result", - "backpressure", ] classifiers = [ "Development Status :: 3 - Alpha", @@ -56,10 +55,10 @@ Repository = "https://github.com/hotung1027/anyiostream" Issues = "https://github.com/hotung1027/anyiostream/issues" [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build >= 0.10.0, <0.11.0"] +build-backend = "uv_build" -[tool.hatch.build.targets.wheel] +[tool.uv_build] packages = ["src/anyiostream"] [tool.pytest.ini_options]