Restore PyPI attestations by making release.yml top-level - #118
Conversation
Attestations were disabled because publish ran as release.yml called reusably from a thin tag-triggered caller, and the reusable-workflow signing identity doesn't match the configured PyPI trusted publisher (workflow release.yml + environment pypi). Converting release.yml into the top-level, directly tag-triggered workflow aligns the code to that existing publisher config, so attestations can be re-enabled with no PyPI-side change required.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e84e6fe93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| environment: | ||
| name: ${{ inputs.environment-name }} | ||
| url: ${{ inputs.pypi-project-url }} | ||
| name: ${{ env.ENVIRONMENT_NAME }} |
There was a problem hiding this comment.
Use a valid context for the environment name
On every matching tag push, GitHub validates this job before running it, but the env context is unavailable in jobs.<job_id>.environment.name; this produces an Unrecognized named-value: 'env' validation error and prevents the entire release workflow from starting. Use the literal pypi value or an allowed context such as vars instead.
AGENTS.md reference: AGENTS.md:L96-L96
Useful? React with 👍 / 👎.
Why
Attestations (PEP 740) were disabled because publish ran as
release.ymlinvoked reusably from a thin tag-triggered caller (python-publish.yml). A reusable workflow's signing identity doesn't match the configured PyPI trusted publisher, which is set to workflowrelease.yml+ environmentpypi— sopypa/gh-action-pypi-publishhadattestations: false.This folds the caller's tag trigger and per-repo values directly into
release.yml, making it the top-level workflow the publisher already expects, and re-enables attestations. No PyPI trusted-publisher change is required — the configuredrelease.ymlidentity now matches both the publisher check and the attestation identity.Changes
release.yml: addedon.push.tags: v*.*.*, folded formerworkflow_callinputs intoenvdefaults, droppedworkflow_calltrigger, removedattestations: falsepython-publish.yml(now dead)AGENTS.mdrelease-process description to matchConfirmed no other repo calls this workflow cross-repo — sibling repos each carry their own local copy.
No release cut, no tag pushed as part of this PR.