From d49cff34bb1496c2890affd5c28c99b54c1e3dd6 Mon Sep 17 00:00:00 2001 From: Yuanchao Zhang Date: Tue, 30 Jun 2026 17:12:03 -0400 Subject: [PATCH 1/2] Add .github/workflows/publish-pypi.yml --- .github/workflows/publish-pypi.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish-pypi.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..fcf5148 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,35 @@ +name: Publish Python Package to PyPI + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + build-release: + uses: ./.github/workflows/build.yml + + pypi-publish: + runs-on: ubuntu-latest + needs: + - build-release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + environment: + name: pypi + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ From 9ed7fcb9229fa6c1a543634b17451fb90b3a174c Mon Sep 17 00:00:00 2001 From: Yuanchao Zhang Date: Tue, 30 Jun 2026 17:18:16 -0400 Subject: [PATCH 2/2] Update test-ci.yml --- .github/workflows/test-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 247be86..8d311bc 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -2,9 +2,9 @@ name: Test Python Package Build on: push: - branches: [ main, dev ] + branches: [ main ] pull_request: - branches: [ main, dev ] + branches: [ main ] workflow_dispatch: # Manual test button permissions: