BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

register package with PyPI #101

Closed prjemian closed 12 months ago

prjemian commented 1 year ago

register package with PyPI for installation by pip install gemviz

prjemian commented 1 year ago

To upload to PyPI from a GHA workflow (such as in apstools), we must create a repository token for PyPI to use, so it accepts new package builds from our GHA workflow.

Once you have an account with PyPI:

  1. Generate a PyPI API Token at https://pypi.org/manage/account/
  2. Section: API tokens
  3. Button: Add API token
  4. Use name: GitHub Actions CI/CD — BCDA-APS/gemviz
  5. Scope: gemviz

Keep this page open so you can copy the token (all text start with pypi-) in a step below. You won't see it again.

prjemian commented 1 year ago

Visit this page: https://github.com/BCDA-APS/gemviz/settings/secrets/actions Button: New repository secret Name: PYPI_API_TOKEN Secret: <as just generated on PyPI, starts with pypi->

prjemian commented 1 year ago

Progress! This error in the most recent run of the publishing workflow says that we need a clean tag (no modifiers such as +g85112a3) to publish.

INFO     Response from https://upload.pypi.org/legacy/:                         
         400 '0.1.dev1+g85112a3' is an invalid value for Version. Error: Can't  
         use PEP 440 local versions. See                                        
         https://packaging.python.org/specifications/core-metadata for more     
         information.                                                           

The most recent tag is 0.0.1. I'll tag with 0.0.2dev1 to indicate this is the next pre-release tag, for development purposes.