Add trusted publishing workflows - #709
Conversation
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
|
@Zeitsperre sorry ... I was too late for the invite to accept. Can you send it again? |
|
@cehbrecht All good. Invite sent! |
|
One thing I forgot to mention is that the Publishing workflow needs to be configured by an owner/maintainer on PyPI: https://docs.pypi.org/trusted-publishers/adding-a-publisher/ The information needed is as follows:
|
|
@Zeitsperre I'm a maintainer on pypi for pywps ... but the "manage" button is disabled. @tomkralidis is pywps managed via geopython? |
@cehbrecht it turns out you did not have "Owner" privs in PyPI on PyWPS. I've enabled this just now, let me know if this helps/works. |
|
@cehbrecht Once the workflow is set up on PyPI, we can merge this PR and create a release. Afterwards, it'll be a cinch to close #705. |
|
@tomkralidis thanks. it worked :) @Zeitsperre ... I have added the trusted publisher on pypi now. |
|
@cehbrecht Awesome, I just need someone to approve this PR. |
Overview
This PR implements Trusted Publishing, which is a more automated and secure method for deploying packages from GitHub to TestPyPI/PyPI.
The workflows are triggered by tags (TestPyPI) and releases (PyPI). When a trigger occurs, GitHub Workflows automatically generates packages (wheel and sdist) and a short-lived access token with the index and then deploys the package for publishing.
As an extra security measure, each workflow relies on an environment for deployment (
stagingandproduction, already configured). The only rules so far are that a "release" deployment to PyPI must be given the OK from an existing owner (@cehbrecht, @jachym, or @jorgejesus) before a package is built and deployed.The workflows use the
buildpackage to prepare thesdistandwheel.Related Issue / Discussion
Closes #708
Additional Information
I've created an entry for PyWPS on TestPyPI by uploading the last stable version (4.7.0). @cehbrecht has received an invitation as owner, but if the other owners would like access, they will need to make an account on that index. Let me know if you do.
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)