Feat/npm pypi packaging#31
Merged
Merged
Conversation
PyPI (warehouse) matches the OIDC job_workflow_ref claim — the file that runs the publish step (release.yml) — not workflow_ref (the cd.yml caller). The earlier docs said cd.yml for both registries, which produced invalid-publisher on PyPI. npm is the opposite and matches the caller, so: - PyPI -> release.yml - npm -> cd.yml No workflow code change; only the trusted-publisher config differs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Trusted-publisher AUTH matches job_workflow_ref (release.yml), but the PEP 740 attestation's Build Config URI is taken from workflow_ref (the cd.yml caller), so PyPI rejects the upload with a 400: the attestation can never match the release.yml publisher when the publish step runs in a reusable workflow. Set attestations: false. Release artifacts still carry SLSA provenance + cosign signatures from GoReleaser. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The publish jobs previously ran inside the reusable release.yml, which split the OIDC claims (workflow_ref=cd.yml vs job_workflow_ref=release.yml). PyPI auth matched release.yml but the PEP 740 attestation's Build Config URI came from cd.yml, so no single trusted publisher satisfied both and uploads failed with 400 Invalid attestations. This is the difference from szr, whose release.yml is triggered directly on the tag push (both claims resolve to release.yml). Move publish-npm and publish-pypi into cd.yml (the top-level entry workflow), running after stable-release. Both OIDC claims now resolve to cd.yml, so a single trusted publisher (cd.yml) works for npm and PyPI with attestations on. Removed attestations: false. Configure both trusted publishers with cd.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
No description provided.