Repository navigation
Trusted publishing, release-please, dependabot - #9
Merged
Merged
Conversation
ubuntu-latest now resolves to Ubuntu 26.04, for which actions/setup-python has no Python 3.8 or 3.9 builds, so the 3.8/3.9 jobs fail at setup. Ubuntu 24.04 still provides every version in the matrix (3.8-3.14).
rkoopmans
force-pushed
the
ci/trusted-publishing
branch
from
November 28, 2026 12:20
b41fa42 to
62ac35a
Compare
The github.com fixtures (2020 DigiCert leaf -> DigiCert SHA2 High Assurance Server CA -> DigiCert High Assurance EV Root CA) depend on a root Mozilla has retired. Current CA bundles (Ubuntu ca-certificates 20260816, Fedora) no longer ship it, so the system-store tests fail on the Python 3 runners. - Use the chain github.com serves today: github.com -> Sectigo Public Server Authentication CA DV E36 -> Sectigo Public Server Authentication Root E46 (the root is resolved via the intermediate's AIA .p7c). Fixture PEMs are Cert.export() output; values cross-checked with openssl. - test_find_root looks roots up in a bundle built from the fixture roots instead of the host CA bundle, so it no longer depends on which roots the OS ships (the Python 2.7 image's 2019 bundle lacks Root E46). - The root-not-found warning test now makes the root download fail explicitly, since the new chain's root is reachable via AIA. - Drop the unused pem_github fixture (conftest.py) and the old DigiCert certificates.
Replace the PYPI_ACCESS_TOKEN upload with PyPI Trusted Publishing (OIDC). The publish step now runs in its own job in the "pypi" environment with only id-token: write, so gh-action-pypi-publish can mint a short-lived upload token and attach signed PEP 740 provenance attestations. - Split the old Publish job into Build (build + install checks, uploads dist/ as an artifact) and Publish (downloads dist/, uploads to PyPI) - Enable skip-existing so re-running Publish can complete a partially uploaded release - Default the workflow token to contents: read - Bump checkout to v4, setup-python to v5; drop unused wheel install - Use the current input name print-hash; packages-dir defaults to dist/
Add a release-please job to the CI/CD workflow. On every push to master (after tests and mypy pass) it maintains a release PR; merging that PR creates the tag and GitHub release, which then runs Build and Publish. Publishing stays in ci-cd.yml because tags created by the job do not trigger other workflows, and the PyPI trusted publisher is bound to this workflow file. The manual tag-push trigger is removed. Release safety: - Build publishes only if the release tag points at the commit this run tested (github.sha), so a release PR whose own run failed or is still running can't be published from a later run's release-please - A concurrency group serialises release-please runs - workflow_dispatch on a release tag re-runs the tests on that tag and publishes it, to recover from a failed or refused publish - Clear errors when the tag and __version__ disagree, stating that the GitHub release exists without a PyPI upload Configuration: - Tags keep the existing format without a "v" prefix (e.g. 1.4.2) - __version__ is bumped via the x-release-please-version annotation - Commit search is bootstrapped from the 1.4.1 release commit - Only feat, fix, perf, deps and revert commits trigger a release; docs/chore/ci/etc. are hidden - Add the missing 1.4.1 CHANGELOG entry so release-please continues from a complete history Release-As: 1.4.2
Pin every action to a full commit SHA with the matching release tag as a trailing comment, so a moved or compromised tag can't change what runs in CI or in the PyPI publish job. Dependabot keeps both SHA and comment up to date. Each action is pinned to the latest release in the major it already used; the stragglers (checkout@v3 in mypy, setup-python@v4 in the test jobs) are aligned to the same pinned versions: - actions/checkout v4.4.0 - actions/setup-python v5.6.0 - actions/upload-artifact v4.6.2 - actions/download-artifact v4.3.0 - codecov/codecov-action v4.6.0 - googleapis/release-please-action v4.4.1 - pypa/gh-action-pypi-publish v1.14.3
Weekly, grouped updates for the SHA-pinned actions. A 14-day cooldown means only releases that have been public for two weeks are proposed, giving time for a compromised or broken release to be caught first. Commits use the "ci" prefix so they don't trigger a release-please release on their own. pip is intentionally not tracked: requirements.txt feeds install_requires (cryptography>=3.1) and Dependabot would raise that floor for users.
rkoopmans
force-pushed
the
ci/trusted-publishing
branch
from
November 28, 2026 12:30
62ac35a to
54143bd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
No description provided.