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

[MAINT] Add workflow to autodeploy to PyPi #568

Merged
merged 4 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,28 @@ jobs:
- codecov/upload:
file: /tmp/src/coverage/coverage.xml

deploy:
docker:
- image: continuumio/miniconda3
steps:
- checkout
- run:
name: init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = $PYPI_USER" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
name: create package
command: |
python setup.py sdist
python setup.py bdist_wheel
- run:
name: upload to pypi
command: |
pip install twine
twine upload dist/*

workflows:
version: 2.1
build_test:
Expand Down Expand Up @@ -283,3 +305,11 @@ workflows:
- four-echo
- five-echo
- t2smap
- deploy:
requires:
- merge_coverage
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+(?:rc)?(?:[0-9]+)?
branches:
ignore: /.*/
5 changes: 2 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,12 @@ releasing your own Python projects!
#. Create a new release, using the GitHub `guide for creating a release on GitHub`_.
`Release-drafter`_ should have already drafted release notes listing all
changes since the last release; check to make sure these are correct.
#. Pulling from the ``master`` branch, locally build a new copy of tedana and
`upload it to PyPi`_.

We have set up tedana so that releases automatically mint a new DOI with Zenodo;
a guide for doing this integration is available `here`_.
We have also set up the repository so that tagged releases automatically deploy
to PyPi (for pip installation).

.. _`upload it to PyPi`: https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
.. _`guide for creating a release on GitHub`: https://help.github.com/articles/creating-releases/
.. _`Release-drafter`: https://github.com/apps/release-drafter
.. _here: https://guides.github.com/activities/citable-code/