Skip to content

Publish to PyPI via github action/trusted publisher #1113

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

Open
gdementen opened this issue Jul 25, 2024 · 0 comments
Open

Publish to PyPI via github action/trusted publisher #1113

gdementen opened this issue Jul 25, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

gdementen commented Jul 25, 2024

I tried to set this up for the 0.34.3 release, but I was a bit in a hurry and did not finish it. I still commited it hoping that it would work but the partial 0.34.4 release proved that it does not: the "build things" part seems to work (https://github.com/larray-project/larray/actions/runs/10060877031/job/27809523590), but not the "upload to (Test)PyPI" part (https://github.com/larray-project/larray/actions/runs/10060877031/job/27809545611). I suspect it is because I configured the trusted publisher on PyPI to use a specific "release" Environment (because this was recommended) and did not configure anything specific on the GitHub side. To be honest, I don't know what an Environment means in this context, I will have to look that up.

References: https://docs.pypi.org/trusted-publishers/troubleshooting/

FWIW, for the 0.34.3 release, I used a personal token for my PyPI account instead because the old login/password method is not supported anymore. The token method is not recommended but at least it was easier to setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant