From a8aca73dfcaad54110d8361c6a8bfab85d7ee218 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:36:28 +0000 Subject: [PATCH 1/6] ci: add PyPI deploy stage with manual approval --- .github/workflows/release.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e2a216..810a411 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,4 +183,23 @@ jobs: uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/*.whl \ No newline at end of file + asset_path: ./dist/*.whl + + deploy_pypi: + name: Deploy to PyPI + runs-on: ubuntu-latest + needs: release + if: startsWith(github.ref, 'refs/tags/') + environment: pypi + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: wheels_* + merge-multiple: true + path: ./dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./dist/ \ No newline at end of file From 8d5677b66c7d2b0be961f2be2e9bbf0246b239a5 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:39:09 +0000 Subject: [PATCH 2/6] ci: add manual deploy trigger from GitHub Release assets --- .github/workflows/release.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 810a411..b90988c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -188,17 +188,20 @@ jobs: deploy_pypi: name: Deploy to PyPI runs-on: ubuntu-latest - needs: release - if: startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'workflow_dispatch' environment: pypi permissions: id-token: write steps: - - uses: actions/download-artifact@v4 - with: - pattern: wheels_* - merge-multiple: true - path: ./dist/ + - uses: actions/checkout@v4 + - name: Download wheels from latest GitHub Release + run: | + mkdir -p dist + gh release download --pattern '*.whl' --dir dist + echo "Downloaded wheels:" + ls -la dist/ + env: + GH_TOKEN: ${{ github.token }} - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From e65600c68a0c564f54397d339ef7c9b1392a21fa Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:43:45 +0000 Subject: [PATCH 3/6] ci: add test_deploy dry-run for branch validation --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b90988c..a025f45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ on: push: tags: - "v*" + branches: + - "feat/pypi-deploy" workflow_dispatch: jobs: @@ -205,4 +207,20 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: ./dist/ \ No newline at end of file + packages-dir: ./dist/ + + test_deploy: + name: Test Deploy (dry-run) + runs-on: ubuntu-latest + if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v4 + - name: Download wheels from latest GitHub Release + run: | + mkdir -p dist + gh release download --pattern '*.whl' --dir dist + echo "Downloaded wheels:" + ls -la dist/ + echo "Dry-run: would publish these to PyPI" + env: + GH_TOKEN: ${{ github.token }} \ No newline at end of file From 3c2cb9664feb34a42b90e464b9e6de00b95fe211 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:48:59 +0000 Subject: [PATCH 4/6] ci: separate deploy.yml for PyPI, remove deploy from release.yml --- .github/workflows/deploy.yml | 27 ++++++++++++++++++++++ .github/workflows/release.yml | 42 +---------------------------------- 2 files changed, 28 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e663a47 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy to PyPI + +on: + workflow_dispatch: + +jobs: + deploy: + name: Publish to PyPI + runs-on: ubuntu-latest + environment: pypi + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Download wheels from latest GitHub Release + run: | + mkdir -p dist + gh release download --pattern '*.whl' --dir dist + echo "Downloaded wheels:" + ls -la dist/ + env: + GH_TOKEN: ${{ github.token }} + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./dist/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a025f45..9e2a216 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,6 @@ on: push: tags: - "v*" - branches: - - "feat/pypi-deploy" workflow_dispatch: jobs: @@ -185,42 +183,4 @@ jobs: uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/*.whl - - deploy_pypi: - name: Deploy to PyPI - runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' - environment: pypi - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - name: Download wheels from latest GitHub Release - run: | - mkdir -p dist - gh release download --pattern '*.whl' --dir dist - echo "Downloaded wheels:" - ls -la dist/ - env: - GH_TOKEN: ${{ github.token }} - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: ./dist/ - - test_deploy: - name: Test Deploy (dry-run) - runs-on: ubuntu-latest - if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') - steps: - - uses: actions/checkout@v4 - - name: Download wheels from latest GitHub Release - run: | - mkdir -p dist - gh release download --pattern '*.whl' --dir dist - echo "Downloaded wheels:" - ls -la dist/ - echo "Dry-run: would publish these to PyPI" - env: - GH_TOKEN: ${{ github.token }} \ No newline at end of file + asset_path: ./dist/*.whl \ No newline at end of file From 6d661d68e73de6d53768de3d2dbdc900560ef262 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:51:09 +0000 Subject: [PATCH 5/6] ci: temp branch trigger for deploy testing --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e663a47..0b93a6b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,6 +2,9 @@ name: Deploy to PyPI on: workflow_dispatch: + push: + branches: + - "feat/pypi-deploy" jobs: deploy: From 033f3e02055724bb8c95bae206ae261fdc254081 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Sat, 21 Mar 2026 07:53:22 +0000 Subject: [PATCH 6/6] ci: remove temp branch trigger from deploy.yml --- .github/workflows/deploy.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0b93a6b..e663a47 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,6 @@ name: Deploy to PyPI on: workflow_dispatch: - push: - branches: - - "feat/pypi-deploy" jobs: deploy: