Push for PyPI Trusted Publisher usage #267
Merged
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.
Closes #180
Trusted Publisher is a feature from PyPI that is currently not supported from reusable/callable workflows.
To workaround this fact, the CD - Release workflow has been modified in two ways:
publish_on_pypi
has been changed tofalse
.upload_distribution
that defaults totrue
.To support the latter, a new
build_dir
input has been added, which specifies the build target folder for the distribution. It should match either the custom output folder expressed in thebuild_cmd
input or the default build directory for the chosen build library.In an attempt to combat users that rely on default values of
publish_on_pypi
, the input has been made a required input.Hopefully, this has the effect that for workflows, where it has not been specified explicitly, any runs using the latest version will fail, prompting users to check the documentation, where an informational admonition has been placed front and center on the landing page, as well as at the top of the CD - Release-specific documentation page.
Note, the status of "required" for
publish_on_pypi
will only last for the next minor version release (expected to be v2.8).The CD - Release-specific documentation page has had a new section added to it, regarding how one can utilize the workflow as well as implement PyPI's Trusted Publisher feature.
Example of the warning on the landing page that will be introduced by this PR:
![image](https://private-user-images.githubusercontent.com/43357585/348279731-61e6dbc1-e605-40ad-8c77-232a04d075da.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNTEwNjgsIm5iZiI6MTczOTA1MDc2OCwicGF0aCI6Ii80MzM1NzU4NS8zNDgyNzk3MzEtNjFlNmRiYzEtZTYwNS00MGFkLThjNzctMjMyYTA0ZDA3NWRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDIxMzkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0MDI4NGExYWE5ZWU0MzViYWFjZjc4MzY3YjU2OGVjY2JmZTdlYjhkNjQyNGM4MjU4NWQwNWJiYjhjMDk2MWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ET4wVY8iLIBGpvbQbi6hoBYSvse7NYxTjolFpDEV6Eo)