Skip to content

Use PyPI trusted publishing with a separate build job - #23

Open
kishan3 wants to merge 2 commits into
zytedata:masterfrom
kishan3:trusted-publishing
Open

kishan3 wants to merge 2 commits into
zytedata:masterfrom
kishan3:trusted-publishing

Conversation

@kishan3

@kishan3 kishan3 commented Oct 23, 2026

Copy link
Copy Markdown
Member

Rewrites .github/workflows/publish.yml following zytedata/clear-html#14:

  • A build job builds the sdist and wheel and uploads dist/ as an artifact.
  • A publish job runs in the pypi environment with id-token: write, downloads the artifact and publishes it. No password: token is used anymore.
  • Workflow permissions default to contents: read, checkout does not persist credentials, and actions are pinned to commit SHAs.

Before the next release, a maintainer needs to:

  1. Register html-text as a trusted publisher on PyPI (workflow publish.yml, environment pypi).
  2. Create the pypi environment in the GitHub repository settings.

The PYPI_TOKEN secret can be removed afterwards.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.28%. Comparing base (2dc4e94) to head (ae07d4b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files           2        2           
  Lines         105      105           
  Branches       19       19           
=======================================
  Hits           99       99           
  Misses          4        4           
  Partials        2        2           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

twine 6.2.0 rejects the metadata version 2.5 that current hatchling emits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wRAR
wRAR requested a review from AdrianAtZyte October 23, 2026 11:01

@AdrianAtZyte AdrianAtZyte left a comment

Copy link
Copy Markdown

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 need to get the PyPI trusted publishing set up, I will merge once I do (and I will solve any conflicts with the other PR, no worries).

@kishan3

kishan3 commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Looks good to me. I need to get the PyPI trusted publishing set up, I will merge once I do (and I will solve any conflicts with the other PR, no worries).

Alright, 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.

4 participants