Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add action to publish to pypi #948

Merged
merged 1 commit into from
Jul 13, 2022
Merged

Add action to publish to pypi #948

merged 1 commit into from
Jul 13, 2022

Conversation

joezuntz
Copy link
Collaborator

This adds a github action that automatically pushes the code to pypi whenever you create a release on Github.

The current version just pushes to the test version of pypi, so that we can see if everything is working before releasing to the real version. I'd suggest we do that as a first PR and then check it's all working and then a second PR to change it to use the real pypi.

To work this will need one of the maintainers of the PyPI project to create an upload token, by following these steps if they don't have one already.

  • Log into test.pypi.org
  • Click on your user name in the top right > Your Projects > Account Settings
  • Scroll down to "API tokens". Click "Add API Token"
  • Choose a sensible name like CCL_UPLOAD_TOKEN
  • Under "scope", select pyccl from the drop-down menu
  • Click "Add Token", and copy the token that appears to your text file.
  • Go to the Github actions settings page for CCL
  • Click Secrets > Actions in the bar on the left
  • Click New Repository Secret
  • Set the name to TEST_PYPI_PYCCL_UPLOAD and copy the token text in as the value, and add click Add Secret.

From the conda-forge feedstock it looks like the conda version is then automatically updated from the PyPI version.

@coveralls
Copy link

coveralls commented Jul 12, 2022

Pull Request Test Coverage Report for Build 2589188482

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.102%

Totals Coverage Status
Change from base Build 2578302619: 0.0%
Covered Lines: 4557
Relevant Lines: 4693

💛 - Coveralls

Copy link
Collaborator

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@damonge damonge merged commit b0bffc3 into master Jul 13, 2022
@damonge damonge deleted the pypi-action branch July 13, 2022 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants