-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Enable trusted publishing (OIDC) #7622
Conversation
b4c0f91
to
7786e36
Compare
7786e36
to
12093b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I had to google around quite a lot to understand the different actions and their configuration arguments, but they all make sense now and seem standard. Thanks @maresb!
Thanks @michaelosthege for creating the The deployment branches and tags look not quite correct. Since publishing should only take place for tagged releases, it's important to change the ref type to "Tag" instead of "Branch" when adding the pattern for branches and tags: So I think we can get by with unchecking "Allow administrators to bypass configured protection rules", but I'm not entirely sure. Thanks @lucianopaz for checking everything so thoroughly! I felt bad that you had to google around, so I added more comments to hopefully make the context more clear. |
Thanks a lot to @fonnesbeck for getting PyPI and GitHub configured. This should be ready to go. |
Description
Increase the security of our release process by enabling OIDC.
This mirrors pymc-devs/pytensor#1135 and follows similar efforts in pymc-labs/pymc-marketing#975 and pymc-labs/CausalPy@f38030b which AFAIK have been working seamlessly.
While this is a draft release, the only blocker is my lack of permissions on PyPI and GitHub. TODO:
release
with required reviewers. Limit the branches and tags tov*.*.*
to ensure correct formatting of the tags.release
environmentI'm not sure who has GitHub admin, but going from PyPI, I need help from one of @ColCarroll, @fonnesbeck, @michaelosthege, @twiecki. I'm happy to hop on a call with any of you so that we can bring this over the finish line (if you also have GitHub permissions).
This requires a new release to properly test. (We could also mostly-test this if we set up a test-pypi step, but let's do that separately if people want.)
The only change is that when publishing, one of the "required reviewers" for releases as defined above needs to approve the "Upload release to PyPI" job before it executes. This helps to limit the possibilities for anyone trying to publish a fake release to PyPI.
Once there has been a release so that we confirm that this workflow is working properly, then we should delete the PyPI token. (Otherwise there is a lingering risk that someone somehow steals the token and gains privileges over the PyPI project.)
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7622.org.readthedocs.build/en/7622/