Skip to content

Fix PyPI trusted-publishing permission in publish.yml - #780

Merged
amrit110 merged 1 commit into
mainfrom
fix/publish-oidc-permissions
Aug 5, 2026
Merged

Fix PyPI trusted-publishing permission in publish.yml#780
amrit110 merged 1 commit into
mainfrom
fix/publish-oidc-permissions

Conversation

@amrit110

@amrit110 amrit110 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

The v0.3.0 release GitHub Release publish step failed:

```
Trusted publishing exchange failure:
OpenID Connect token retrieval failed: GitHub: missing or insufficient
OIDC token permissions, the ACTIONS_ID_TOKEN_REQUEST_TOKEN environment
variable was unset
```

`pypa/gh-action-pypi-publish` attempts OIDC-based trusted publishing even when a username/password is also supplied, and that requires the job to explicitly request the `id-token: write` permission - which this workflow never had. Adding it.

Test plan

  • Workflow-only change, no Python code touched.
  • Re-run the failed v0.3.0 publish job after this merges to confirm it succeeds.

🤖 Generated with Claude Code

… publishing

The v0.3.0 release failed to publish to PyPI: "Trusted publishing
exchange failure: OpenID Connect token retrieval failed: GitHub:
missing or insufficient OIDC token permissions, the
ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variable was unset."

pypa/gh-action-pypi-publish attempts OIDC-based trusted publishing
regardless of the password/token also being supplied, and that requires
the job to explicitly request the id-token permission, which this
workflow never had.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@amrit110
amrit110 enabled auto-merge (squash) August 5, 2026 14:14
@amrit110
amrit110 merged commit cfe2056 into main Aug 5, 2026
6 checks passed
@amrit110
amrit110 deleted the fix/publish-oidc-permissions branch August 5, 2026 14:32
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.

1 participant