Skip to content

Publish to PyPI through trusted publishing - #3

Merged
Booyaka101 merged 1 commit into
mainfrom
trusted-publishing
Sep 27, 2026
Merged

Booyaka101 merged 1 commit into
mainfrom
trusted-publishing

Conversation

@Booyaka101

@Booyaka101 Booyaka101 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

The release workflow skipped the PyPI upload because there's no token secret, so 1.0.0 and 1.0.1 went up by hand with twine.
This moves the upload into a separate publishjob that runs in apypienvironment withid-token: writeand uses pypa/gh-action-pypi-publish. The build job hands overdist/as an artifact, so tests and the build never run with the OIDC permission.
It needs a trusted publisher on the PyPI side (owner Booyaka101, repo diskstack, workflow release.yml, environment pypi). Until that exists the publish job fails on the next tag. The GitHub release and its artifacts still get made first.
`🤖 Generated with Claude Code

The release job built and attached the artifacts but skipped the upload,
since the repo has no PyPI token. Split publishing into its own job with
id-token: write in a "pypi" environment, so PyPI can trust the workflow
directly and nothing long-lived is stored in the repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Booyaka101
Booyaka101 merged commit c67d093 into main Sep 27, 2026
4 checks passed
@Booyaka101
Booyaka101 deleted the trusted-publishing branch September 27, 2026 05:03
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