Repository navigation
ci: publish to PyPI with trusted publishing and attestations - #27
Merged
Merged
Conversation
Bonajo
added a commit
that referenced
this pull request
Nov 15, 2026
`codestripper --help` described `-e, --fail-on-error` as "Fail if an error occurs during code stripping". The flag does the opposite: it is `store_false`, so failing is the default and `-e` turns it **off**. The help text now says "do NOT fail if an error occurs during code stripping", matching the README table and the wording of `-r`. Behaviour is unchanged; the flag name stays, because renaming it would break existing calls. Tests in `tests/test_main.py`: - `--help` describes `-e` as not failing. This test fails on `main`. - Without `-e`, a file with an invalid tag (`MissingClose.java`) raises `StripError`. - With `-e`, the same file only logs the error. Merging this releases **1.3.1**, the first release through Trusted Publishing with PEP 740 attestations (#27).
|
🎉 This PR is included in version 1.3.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publish with PyPI Trusted Publishing instead of the
PYPI_TOKENsecret, and upload PEP 740 attestations with every file.Why the workflows are merged
PyPI only accepts attestations from Trusted Publishing, and it doesn't accept a reusable workflow as a trusted publisher. So the reusable
pypi-publish.ymland its two callers (semantic-release.ymland the manual-tagrelease.yml) are now a single top-levelrelease.yml:main→ semantic-release (unchanged) → build → publish, run only if a version was cutv*tag pushed by a human → build → publish (the escape hatch; still no GitHub release)Build and publish are separate jobs, so only the job that uploads gets
id-token: write. That job runs in the newpypienvironment, which only allowsmainandv*tags.astral-sh/attest-action(pinned to the commit of v0.0.7) writes the*.publish.attestationfiles, anduv publish --trusted-publishing alwaysuploads them. The release build no longer uses the setup-uv cache.The README's Releases section explains how to verify a file and how to release manually.
Before merging
codestripper: ownerFontysVenlo, repositorycodestripper, workflowrelease.yml, environmentpypiAfter the next fix/feat release
PYPI_TOKENsecret and revoke the token on PyPI. It stays for now as a rollback in case the first trusted-publishing run fails.This PR is
ci:, so merging it cuts no release. The run onmainshould finish with only the semantic release job.The existing action pins (checkout@v6, setup-node@v6, semantic-release-action@v6.0.0, setup-uv@v10.1.0) are kept as they are, so this diff only changes how publishing works.