Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported PyPI trusted publishers #136

Open
lpsinger opened this issue May 4, 2023 · 4 comments
Open

Supported PyPI trusted publishers #136

lpsinger opened this issue May 4, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@lpsinger
Copy link

lpsinger commented May 4, 2023

See https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/, https://docs.pypi.org/trusted-publishers/using-a-publisher/.

To support trusted publishers, add this to the pypa/gh-action-pypi-publish step:

permissions:
  id-token: write

Perhaps a boolean flag to turn this on or off?

@ConorMacBride ConorMacBride added the enhancement New feature or request label May 18, 2023
@ConorMacBride
Copy link
Member

I think we need to wait for pypi/warehouse#11096 to be closed before this will work in the reusable workflows unfortunately.

Once it is, adding what you have above to the upload job in each publish workflow should be all that is needed. The user and password inputs should be okay to keep — it will attempt the trusted publisher authentication when the password is empty. I think it should be fine without an additional flag to enable.

@pllim
Copy link
Contributor

pllim commented Oct 16, 2023

Any update on this? Has the situation changed? PyPA merged the recommendations into https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

@Cadair
Copy link
Member

Cadair commented Oct 16, 2023

Last I checked (a couple of weeks ago) it's still unsupported upstream.

@Cadair
Copy link
Member

Cadair commented Oct 16, 2023

Looks like if you forked the templates into the same org you could maybe make it work: pypi/warehouse#11096 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants