Skip to content

pypi: use trusted publishing for binary wheels #6543

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bjlittle
Copy link
Member

@bjlittle bjlittle commented Jul 1, 2025

🚀 Pull Request

Description

PyPI now supports Trusted Publishing, which is an OIDC-based "tokenless" authentication mechanism for uploading to the index from within a CI/CD workflow.

This "tokenless" flow has significant security benefits over a traditional manually configured API token, and should be preferred wherever supported and possible.

This pull-request also requires PyPI (and Test PyPI) to be configured for Trusted Publishing for the scitools-iris project, which has already been performed.

Reference:

Comment on lines +147 to +149
repository-url: https://test.pypi.org/legacy/
skip-existing: true
print-hash: true
Copy link
Member Author

@bjlittle bjlittle Jul 1, 2025

Choose a reason for hiding this comment

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

Use kebab-case here, as snake_case is now deprecated

@@ -138,18 +142,20 @@ jobs:
name: pypi-artifacts
path: ${{ github.workspace }}/dist

- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
Copy link
Member Author

@bjlittle bjlittle Jul 1, 2025

Choose a reason for hiding this comment

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

We should be using commit SHAs for GHAs now

Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.89%. Comparing base (5ba6dc1) to head (2559936).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6543   +/-   ##
=======================================
  Coverage   89.89%   89.89%           
=======================================
  Files          90       90           
  Lines       24138    24138           
  Branches     4492     4492           
=======================================
  Hits        21699    21699           
  Misses       1679     1679           
  Partials      760      760           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bjlittle bjlittle force-pushed the pypi-trusted-pub branch from 138b8f0 to 2559936 Compare July 7, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant