bandframework / surmise

A python package for surrogate models that interface with calibration and other tools
https://surmise.readthedocs.io/en/latest/
MIT License
9 stars 6 forks source link

Create publish.yml #73

Closed mosesyhc closed 9 months ago

wildsm commented 9 months ago

This looks neat but I am scared to test it :)

wildsm commented 9 months ago

Has the associated repository secret referenced in the yml been setup @mosesyhc ?

mosesyhc commented 9 months ago

@wildsm : Great question.. I never had to explicitly set it up..

I believe PyPI accepts publishing only via surmising and fetches the secret key there? I will have to look..

mosesyhc commented 9 months ago

@wildsm : No I was wrong. We need to set the secret key up from PyPI end.

https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

wildsm commented 9 months ago

I suggest postponing this until everything else is set for v2. Then this can be a final PR to main.

mosesyhc commented 9 months ago

Adding a note here: this action only publishes a package marked for release. Once we finalize which commit the tag is on, then we can release v0.2.0. That push / pull_request should trigger a publish.

mosesyhc commented 9 months ago

The sequence of actions to set up PyPI for surmise: (tested with https://github.com/mosesyhc/LCGP/releases/tag/v0.1.2)

  1. In pypi, under surmise's publishing tab, add a new publisher:
    • Owner: bandframework
    • Repository name: surmise
    • Workflow name: publish.yml or workflow with other name, stored under .github/workflows/
    • Environment name: left empty to allow release by tags
  2. Assign tag v0.2.0, or update tag to desired commit.
  3. On Github, publish a new release with tag v0.2.0.
  4. The workflow will be triggered by (3) and publish to PyPI.