Remove the PyPI token from GitHub Actions in favor of the Trusted Publishing#871
Merged
jeongyoonlee merged 1 commit intomasterfrom Feb 11, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the release publishing workflow to rely on PyPI Trusted Publishing (OIDC) instead of providing a PyPI API token, aligning the repo’s CI/CD publishing approach with PyPI’s “Trusted Publishers” model.
Changes:
- Removed use of
secrets.PYPI_API_TOKENfrom the PyPI publish step. - Left publishing to be handled by
pypa/gh-action-pypi-publishwithout an explicit password (intended to use OIDC).
Comments suppressed due to low confidence (1)
.github/workflows/python-publish.yml:70
- Trusted Publishing via OIDC requires the workflow/job to grant the
id-token: writepermission (and typicallycontents: read) sopypa/gh-action-pypi-publishcan request an OIDC token. With thepasswordinput removed, this job will fail to authenticate unless those permissions are added at the workflow orupload_alljob level.
- uses: pypa/gh-action-pypi-publish@release/v1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR removes the use of the PyPI API token from the python-publish.yml GitHub Actions. The project has a Trusted Publisher configured on PyPI and doesn't require the API token for publishing (ref: https://docs.pypi.org/trusted-publishers/).
Types of changes
What types of changes does your code introduce to CausalML?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
N/A