diff --git a/.github/workflows/publish_candidates.yml b/.github/workflows/publish_candidates.yml index 53b847f08d..b35f10cd5d 100644 --- a/.github/workflows/publish_candidates.yml +++ b/.github/workflows/publish_candidates.yml @@ -81,9 +81,7 @@ jobs: BASE_VERSION=$(uv version --short) uv version "${BASE_VERSION}rc${{ github.run_id }}" uv build - uv publish --token ${PYPI_TOKEN} --check-url https://pypi.org/simple/ - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + uv publish --trusted-publishing always --check-url https://pypi.org/simple/ - name: Install JS dependencies if: ${{ inputs.js-sdk || inputs.cli }} diff --git a/.github/workflows/publish_packages.yml b/.github/workflows/publish_packages.yml index 0df09e4f8d..cc6512f98e 100644 --- a/.github/workflows/publish_packages.yml +++ b/.github/workflows/publish_packages.yml @@ -5,8 +5,6 @@ on: secrets: E2B_API_KEY: required: true - PYPI_TOKEN: - required: true VERSION_BUMPER_SECRET: required: true @@ -106,8 +104,6 @@ jobs: createGithubReleases: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: '' # See https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - name: Push new versions # A failed publish may have uploaded some Python packages before tagging. diff --git a/packages/code-interpreter-python/package.json b/packages/code-interpreter-python/package.json index 4d58b6fd95..53accbd58e 100644 --- a/packages/code-interpreter-python/package.json +++ b/packages/code-interpreter-python/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "uv run pytest -n 4 --verbose -x", "postVersion": "uv version $(pnpm pkg get version --workspaces=false | tr -d \\\")", - "postPublish": "uv build && uv publish --token ${PYPI_TOKEN} --check-url https://pypi.org/simple/", + "postPublish": "uv build && uv publish --trusted-publishing always --check-url https://pypi.org/simple/", "typecheck": "uv run make typecheck", "lint": "uv run make lint", "format": "uv run make format" diff --git a/packages/desktop-python/package.json b/packages/desktop-python/package.json index 199ed3c3f5..8a97fbedd7 100644 --- a/packages/desktop-python/package.json +++ b/packages/desktop-python/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "uv run pytest -n 4 --verbose -x", "postVersion": "uv version $(pnpm pkg get version --workspaces=false | tr -d \\\")", - "postPublish": "uv build && uv publish --token ${PYPI_TOKEN} --check-url https://pypi.org/simple/", + "postPublish": "uv build && uv publish --trusted-publishing always --check-url https://pypi.org/simple/", "typecheck": "uv run make typecheck", "lint": "uv run make lint", "format": "uv run make format" diff --git a/packages/python-sdk/package.json b/packages/python-sdk/package.json index 2199e5dbe9..ec34c6d51b 100644 --- a/packages/python-sdk/package.json +++ b/packages/python-sdk/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "uv run pytest -n 4 --verbose -x", "postVersion": "uv version $(pnpm pkg get version --workspaces=false | tr -d \\\")", - "postPublish": "uv build && uv publish --token ${PYPI_TOKEN} --check-url https://pypi.org/simple/", + "postPublish": "uv build && uv publish --trusted-publishing always --check-url https://pypi.org/simple/", "typecheck": "uv run make typecheck", "lint": "uv run make lint", "format": "uv run make format"