From d446e8464f03bf9bb8cf5d23d253f0867435f8a8 Mon Sep 17 00:00:00 2001 From: David Hu Date: Fri, 20 Nov 2026 06:33:48 +0000 Subject: [PATCH 1/2] ci: publish to PyPI via trusted publishing (OIDC) Replace the PYPI_TOKEN-based poetry publish with pypa/gh-action-pypi-publish, which authenticates through GitHub OIDC against the trusted publisher configured on PyPI. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2b5d24a..4e400e0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,5 @@ -# This requires you to have a secret PYPI_TOKEN saved in your github environment +# Publishes to PyPI via trusted publishing (OIDC); no PYPI_TOKEN secret needed. +# Requires a trusted publisher on PyPI for this repo + publish.yml. name: Publish to PyPi @@ -9,6 +10,9 @@ on: jobs: publish: runs-on: blacksmith-2vcpu-ubuntu-2404 + permissions: + id-token: write # Required for PyPI trusted publishing + contents: read steps: #---------------------------------------------- # ----- checkout & setup python ----- @@ -54,9 +58,10 @@ jobs: #------------------------------ # ----- publish to pypi ----- #------------------------------ - - name: build & publish - run: | - poetry publish --build --username __token__ --password=${{ secrets.PYPI_TOKEN }} + - name: build + run: poetry build + - name: publish + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 #---------------------------------------------- # ----- mark SDK as released in Sideko ----- #---------------------------------------------- From 75ecff77daf7bd56bdf9601d1670369a52de2a6e Mon Sep 17 00:00:00 2001 From: David Hu Date: Fri, 20 Nov 2026 06:37:17 +0000 Subject: [PATCH 2/2] ci: run PyPI publish on GitHub-hosted runner pypa/gh-action-pypi-publish treats self-hosted runners (Blacksmith) as best effort. Matches magic-hour-node, whose publish job also runs on ubuntu-latest. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e400e0..1e2910c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ on: jobs: publish: - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest # GitHub-hosted: supported env for pypa/gh-action-pypi-publish permissions: id-token: write # Required for PyPI trusted publishing contents: read