From de7c63aef187bbee644073ebafc550b4f44ec620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=89=E6=BE=9C?= Date: Sun, 20 Sep 2026 20:38:11 +0800 Subject: [PATCH] build: adopt stream-sdk PyPI publish workflow Co-Authored-By: Claude Opus 4.7 --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 6 ++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e8a139a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Build and Publish Package + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install build tools + run: | + python -m pip install --upgrade pip build + pip install -e ".[dev]" + - name: Test + run: pytest -v + - name: Build Package + run: python -m build + - name: Publish Package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index c3da2ac..32568bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,12 @@ dev = [ "black>=23.0.0", ] +[project.urls] +Homepage = "https://github.com/DingTalk-Real-AI/dingtalk-channel-sdk-python" +Documentation = "https://github.com/DingTalk-Real-AI/dingtalk-channel-sdk-python" +Repository = "https://github.com/DingTalk-Real-AI/dingtalk-channel-sdk-python.git" +Issues = "https://github.com/DingTalk-Real-AI/dingtalk-channel-sdk-python/issues" + [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"]