ned14 / pcpp

A C99 preprocessor written in pure Python
Other
220 stars 41 forks source link

Automate deployment to pypi #3

Closed andrewleech closed 5 years ago

andrewleech commented 7 years ago

This PR build on #2 to automate deployment of new releases to PyPI

Any time a new version tag is created, and travis tests pass, the package will be released to PyPI automatically.

This makes releasing a new version easier and less error-prone as all that's required is making a new git tag or a new release on the github releases page and a few minutes later it'll be updated on PyPI without having to remember the procedure.

Note: This modification to the travis hasn't been tested personally as it's dependent on your PyPI credentials being added to the travis repository secure variables as PYPI_USERNAME and PYPI_PASSWORD https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings

It also assumes that secure environment variables work in the deployment stage. I typically use gitlab and it's built in ci for doing this rather than travis so not as familiar with the config and restrictions.

If this doesn't work the documented alternative is the secure variables generated with the travis command line client (which I haven't used either): https://docs.travis-ci.com/user/deployment/pypi/ https://stackoverflow.com/a/33783088/3093392

andrewleech commented 7 years ago

Note this only has one commit newer than #2, but they all get listed here due to the branching dependency. If you're interested in this functionality, accept # 2 first and I'll rebase this if required to show the correct merge.

ned14 commented 5 years ago

As I closed PR #2, also closing this.