Skip to content

ci: migrate PyPI release to trusted publishing (OIDC)#2261

Open
bhimrazy wants to merge 3 commits into
mainfrom
chore/pypi-trusted-publishing
Open

ci: migrate PyPI release to trusted publishing (OIDC)#2261
bhimrazy wants to merge 3 commits into
mainfrom
chore/pypi-trusted-publishing

Conversation

@bhimrazy

@bhimrazy bhimrazy commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Migrates the PyPI release workflow from token-based authentication to OIDC trusted publishing, following the same pattern as Lightning-AI/litData#827.

  • Splits the workflow into build, upload-release-assets, and publish-pypi jobs
  • Shares dist/ through a GitHub artifact between jobs
  • Uploads built distributions to GitHub Releases on release events
  • Publishes to PyPI with OIDC (permissions: id-token: write) and removes the PYPI_API_TOKEN secret requirement

Pre-requisite before merging: configure a trusted publisher on the litgpt PyPI project (Manage → Publishing) with owner Lightning-AI, repo litgpt, workflow publish-pkg.yml.

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

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