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

ci: Use PyPI Trusted Publisher for publishing package #294

Merged

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented May 24, 2024

I've added a Trusted Publisher to fastjet on PyPI.

image

* Use the OpenID Connect (OIDC) standard to publish to PyPI and TestPyPI
  using PyPI's "Trusted Publisher" implementation to publish without
  using API tokens stored as GitHub Actions secrets. Use an optional
  GitHub Actions environment to further restrict publishing to selected
  branches for additional security.
   - c.f. https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
   - c.f. https://docs.pypi.org/trusted-publishers/
@matthewfeickert matthewfeickert added the ci Continuous integration label May 24, 2024
@matthewfeickert matthewfeickert self-assigned this May 24, 2024
Comment on lines +100 to +102
# Restrict to the environment set for the trusted publisher
environment:
name: publish
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a "publish" environment with the following protection rules:

image

.github/workflows/wheels.yml Show resolved Hide resolved
@matthewfeickert matthewfeickert marked this pull request as ready for review May 26, 2024 18:00
Copy link
Member

@jpivarski jpivarski left a 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.

@matthewfeickert matthewfeickert merged commit 0d4b0a8 into scikit-hep:main May 28, 2024
13 checks passed
@matthewfeickert matthewfeickert deleted the ci/use-trusted-publishers branch May 28, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants