pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.58k stars 987 forks source link

Add .github/workflows/publish.yml to publish to pypi.org #3326

Closed fritzo closed 9 months ago

fritzo commented 9 months ago

This aims to automate part of pyro's release process, namely uploading the pyro-ppl package to pypi.

I don't know how to test this script. I've copied it from github docs (which seems to be newer than the starter workflow; see all versions here).

I've also created an org-wide secret PYPI_API_TOKEN. I'm unsure whether there's anything else I need to do to make this secret available to the workflow.

eb8680 commented 9 months ago

I don't know how to test this script

I'm not sure if it will run from a branch other than the designated main branch (dev), but I think you can merge this into dev and cut a test release that won't be installed by people who don't explicitly request it by doing the following (possibly redundant) steps:

  1. Including a pre-release suffix in the setup.py semver and commit tag (e.g. 1.8.6-alpha0)
  2. Marking the GitHub test release as a pre-release and as not the latest release
  3. Yanking or deleting the release from PyPI and GitHub after it is published