Skip to content
New issue

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

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

Already on GitHub? # to your account

Add trusted_publishing via Pypi #85

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Conversation

michaelfeil
Copy link
Contributor

@michaelfeil michaelfeil commented Apr 2, 2024

Benefit: If someone submits a PR, they cannot steal the PYPI_TOKEN
Closes #84

Adapted from:
https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#trusted-publishing

There are some steps that the admin of this repo need to do. Both are UI actions.

TODO:

  1. Pypi.org Follow pypi guide https://docs.pypi.org/trusted-publishers/adding-a-publisher/

This should roughly do it

- owner "sarugaku"
- repository name "shellingham"
- workflow "publish.yml"
- environment name "pypi" # The name of environment in the yaml needs to match the name of the github UI and what you put on pypi
  1. github.com Create a environment named "pypi" in github UI under environments.
    Below a screenshot of project github.com/michaelfeil/infinity and added e.g. me as Required Reviewer (e.g. if someone else pushes a tag to my repo, this stalls the github CI, and I get a notification to approve the publish.yml workflow)
    image

@michaelfeil
Copy link
Contributor Author

@uranusjr

@uranusjr uranusjr merged commit 3e7ca60 into sarugaku:master Apr 9, 2024
19 checks passed
@uranusjr
Copy link
Member

uranusjr commented Apr 9, 2024

Alright I think I’ve set things up… Let’s see next time we need to release something. Thanks a lot!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure Pypi trusted publishing pipeline
2 participants