It was added in #1171 but gives advice exactly opposite of what I recommend in pypi-publish
. Probably copied from some outdated examples. The correct way would be building in a dedicated job, storing as a GHA artifact, and only uploading it a two-step publishing job. It's also best to show the use of OIDC with that, not long-living API tokens that make it impossible to produce digital signatures.
I'm concerned because I regularly observe people mass-copying random bad examples from the internet and then get upset when I tell them that it's unsupported.
There's a complete example of what's supported @ https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow. It's best to use that as a base for examples here.