Skip to content

Deploy to PyPI from Travis CI #430

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

Closed
wants to merge 4 commits into from
Closed

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Nov 8, 2019

This should help make releasing easier.

  • Deploy non-tagged builds to Test PyPI
  • Deploy tagged builds to live PyPI

Will only trigger when run from the html5lib/html5lib-python repo, so not for forks.

TODO:

  1. Add an API token called (say) html5lib-ci at https://test.pypi.org/manage/account/token/
  2. On the command line, install the Travis Client
  3. Run travis encrypt
  4. Paste in the token from step 1, it begins pypi-
  5. Ctrl-D to end
  6. Add the encrypted value as the password: secure: "TODO" value on line 53
  7. Repeat for production PyPI, put the encrypted value on line 64

More info on PyPI API tokens: https://pypi.org/help/#apitoken

@hugovk hugovk mentioned this pull request Nov 8, 2019
@codecov-io
Copy link

codecov-io commented Nov 8, 2019

Codecov Report

Merging #430 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #430   +/-   ##
=======================================
  Coverage   90.52%   90.52%           
=======================================
  Files          50       50           
  Lines        6973     6973           
  Branches     1328     1328           
=======================================
  Hits         6312     6312           
  Misses        502      502           
  Partials      159      159

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af19281...98ff5ca. Read the comment docs.

@gsnedders
Copy link
Member

Deploy non-tagged builds to Test PyPI

Perhaps stupid question, "Test PyPI"?

@hugovk
Copy link
Contributor Author

hugovk commented Feb 26, 2020

It's "a separate instance of the Python Package Index that allows you to try distribution tools and processes without affecting the real index".

https://test.pypi.org/

I find it useful to deploy to TestPyPI on untagged merges to master. That way, it's actually testing the release process and machinery, to give confidence that tagged builds deploy to production PyPI.

For example, I have it set up in https://github.com/hugovk/pypistats, which also uses setuptools_scm, so the dev version number automatically updates, and so a new upload can go to TestPyPI for each merge.

Another benefit is it creates WIP builds which people could use for testing in between releases.

More info on TestPyPI:
https://packaging.python.org/guides/using-testpypi/

@hugovk
Copy link
Contributor Author

hugovk commented Dec 28, 2020

Closing old PR, but let me know if you'd like it re-opened. I'd also use GitHub Actions instead today, as the new Travis CI pricing model isn't making things easy for OSS.

@hugovk hugovk closed this Dec 28, 2020
@hugovk hugovk deleted the deploy-to-pypi branch May 17, 2021 11:10
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