ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
19 stars 8 forks source link

Setup trusted publishing #198

Closed davidorme closed 5 months ago

davidorme commented 5 months ago

It is going to be much easier to manage publication of the pyrealm as part of the GH actions workflow using trusted publishing, rather than relying on authentication using PyPI tokens. For a start, those tokens need to be stored securely but also shared amongst team members who want to make a release.

@dalonsoa pointed to a similar approach here:

https://github.com/ImperialCollegeLondon/virtual_ecosystem/pull/401#pullrequestreview-1913398522 https://github.com/EnergySystemsModellingLab/MUSE_OS/blob/develop/.github/workflows/publish.yml

We've implemented something similar here, which we can basically clone.

https://github.com/ImperialCollegeLondon/virtual_ecosystem/issues/405 https://github.com/ImperialCollegeLondon/virtual_ecosystem/pull/408

Describe the solution you'd like

Set up a GH workflow to publish when a release is made. I think the sequence is basically:

So: