Skip to content

fix: use PyPI Trusted Publishing instead of a repo-secret API token - #14

Merged
mesrikanthreddy merged 1 commit into
devfrom
feat/vscode-extension-inline-warnings
Jul 18, 2026
Merged

fix: use PyPI Trusted Publishing instead of a repo-secret API token#14
mesrikanthreddy merged 1 commit into
devfrom
feat/vscode-extension-inline-warnings

Conversation

@mesrikanthreddy

Copy link
Copy Markdown
Collaborator

publish-pypi tried password auth via secrets.PYPI_API_TOKEN, which was never actually set as a repo secret (v1.1.0 was published manually instead). With password empty, gh-action-pypi-publish fell back to OIDC trusted publishing, which then failed too since the job had no id-token permission.

Switch to Trusted Publishing properly: add permissions: id-token: write and drop the password input so the action always uses OIDC. No long-lived token to rotate or leak. Requires a one-time trusted publisher registration on pypi.org (project kshield → Publishing → add YTT-Global/kshield, workflow release.yml) before the next tagged release.

publish-pypi tried password auth via secrets.PYPI_API_TOKEN, which was
never actually set as a repo secret (v1.1.0 was published manually
instead). With password empty, gh-action-pypi-publish fell back to
OIDC trusted publishing, which then failed too since the job had no
id-token permission.

Switch to Trusted Publishing properly: add `permissions: id-token:
write` and drop the password input so the action always uses OIDC.
No long-lived token to rotate or leak. Requires a one-time trusted
publisher registration on pypi.org (project kshield → Publishing →
add YTT-Global/kshield, workflow release.yml) before the next tagged
release.
@mesrikanthreddy
mesrikanthreddy merged commit 2f780da into dev Jul 18, 2026
5 checks passed
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