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

Add trusted publisher support #1578

Merged
merged 1 commit into from
Apr 26, 2023
Merged

Add trusted publisher support #1578

merged 1 commit into from
Apr 26, 2023

Conversation

messense
Copy link
Member

Closes #1575

@netlify
Copy link

netlify bot commented Apr 26, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 99e45a3
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/644927aede995a0008c4425e
😎 Deploy Preview https://deploy-preview-1578--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense
Copy link
Member Author

Manually tested in typst-py project and it works:

image

@messense
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 26, 2023

@bors bors bot merged commit 0d7442e into PyO3:main Apr 26, 2023
@messense messense deleted the oidc branch April 26, 2023 14:24
) -> (String, String) {
// API token from environment variable takes priority
if let Ok(token) = env::var("MATURIN_PYPI_TOKEN") {
return ("__token__".to_string(), token);
}

// Try to get a token via OIDC exchange
match resolve_pypi_token_via_oidc(registry_url) {
Copy link
Member

Choose a reason for hiding this comment

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

what happens if someone uses this with a registry that isn't pypi?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will print a failure warning, but we can certainly do better to not show a warning. I'll improve it later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

thank you!

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

Successfully merging this pull request may close these issues.

Trusted Publisher support for PyPI
2 participants