Skip to content

ci: publish to PyPI via trusted publishing (OIDC)#29

Merged
amayvs merged 1 commit into
mainfrom
ci-pypi-trusted-publishing
Jun 19, 2026
Merged

ci: publish to PyPI via trusted publishing (OIDC)#29
amayvs merged 1 commit into
mainfrom
ci-pypi-trusted-publishing

Conversation

@amayvs

@amayvs amayvs commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Why

The publish workflow failed with 403 Invalid or non-existent authentication information because it authenticates with secrets.PYPI_API_TOKEN, which no longer exists in the repo or org (the org now standardises on OIDC-based auth). The 0.1.x releases predate that secret's removal.

What

Port the same tokenless flow paradex-py already uses — PyPI trusted publishing via OIDC:

  • Add permissions: id-token: write (+ contents: read) so GitHub mints the OIDC token uv publish exchanges with PyPI.
  • Add environment: prod (matches paradex-py).
  • Drop the UV_PUBLISH_TOKEN / PYPI_API_TOKEN secret entirely.

The tag trigger (v*.*.*) and the tag-vs-pyproject version check are unchanged.

Follow-up (admin, one-time)

Register a trusted publisher for the paradex-cli project on PyPI: repo tradeparadex/paradex-cli, workflow publish.yml, environment prod — exactly as configured for paradex-py. Until that's registered, publish will still be rejected.

Replaces the PYPI_API_TOKEN secret (no longer present, causing a 403 on
publish) with PyPI trusted publishing via OIDC, matching paradex-py.
Adds the prod environment and id-token: write permission and drops the
token env var.

Requires a one-time trusted-publisher registration for this project on
PyPI (repo + workflow + environment).
@amayvs
amayvs merged commit c121f33 into main Jun 19, 2026
2 checks passed
@amayvs
amayvs deleted the ci-pypi-trusted-publishing branch June 19, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants