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

use trusted publishers instead of a API token #7899

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

keewis
Copy link
Collaborator

@keewis keewis commented Jun 7, 2023

PyPI introduced the concept of "trusted publishers" a few months ago, which allows requesting short-lived API tokens for trusted publishing services (such as GHA, in our case).

Someone with the appropriate rights will have to enable this on PyPI, and I will do the same for TestPyPI.

@github-actions github-actions bot added the Automation Github bots, testing workflows, release automation label Jun 7, 2023
@dcherian
Copy link
Contributor

dcherian commented Jun 7, 2023

Just did it.

@keewis
Copy link
Collaborator Author

keewis commented Jun 7, 2023

great, thanks. Not sure how to verify this is working when we're not actually releasing, but I can push a tag to publish a rc/alpha version to TestPyPI.

Edit: once we verified it works I will delete the API tokens from the secrets.

@dcherian
Copy link
Contributor

Shall we merge?

@keewis keewis merged commit 073a57f into pydata:main Jun 16, 2023
@keewis keewis deleted the trusted-publishers branch June 16, 2023 08:37
@keewis
Copy link
Collaborator Author

keewis commented Jun 16, 2023

after relaxing the environment rules (not sure how we can restrict publishing to just v* tags) the upload to TestPyPI appears to have worked, so I'll remove that secret. For the PyPI one we'll have to wait and see what happens when we try to release.

dstansby pushed a commit to dstansby/xarray that referenced this pull request Jun 28, 2023
* use trusted publishers instead of a API token

* same for TestPyPI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Github bots, testing workflows, release automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants