ci(publish): restore OIDC Trusted Publishing + enable attestations#89
Merged
Conversation
Drop the legacy PYPI_USERNAME/PYPI_PASSWORD auth (from #84): setting an explicit password disables Trusted Publishing AND silently ignores PEP 740 attestations. Use OIDC (no long-lived creds) with attestations: true, alongside the existing build-provenance attestation step. Requires a one-time PyPI Trusted Publisher for namecheap/fast_mail_parser + publish.yml. Also set download-artifact digest-mismatch to warn: the upload@v7/download@v8 pairing can report a spurious digest mismatch that fails artifact collection even though the download succeeds (provenance attestation still covers integrity). Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
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.
The v0.4.0 publish surfaced two issues; this fixes both.
1. OIDC + attestations (your call)
The legacy
PYPI_USERNAME/PYPI_PASSWORDauth I added in #84 disabled Trusted Publishing and silently ignored the PEP 740 attestations (the exact warning from the run). Reverted to OIDC: droppeduser/password, setattestations: trueexplicitly. Combined with the existingattest-build-provenancestep, the release is fully attested.➡️ One-time PyPI setup required: add a Trusted Publisher for
namecheap/fast_mail_parser, workflowpublish.yml(no environment) at https://pypi.org/manage/project/fast-mail-parser/settings/publishing/ — the publish fails without it.2. Artifact digest-mismatch
download-artifact@v8(Dependabot #70) failed theReleasejob on a digest check againstupload-artifact@v7(#71), even though all artifacts downloaded fine. Setdigest-mismatch: warnso a spurious mismatch doesn't block the release — integrity is still covered by the provenance attestation.After this merges + the Trusted Publisher is configured, re-creating the v0.4.0 release publishes via OIDC with attestations.