Skip to content

Commit

Permalink
Configure automatic release with CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Apr 2, 2019
1 parent 9483722 commit 37eac2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
nox -f noxfile.py -s unit
Lint:
docker:
- image: circleci/python:3.6.4
- image: circleci/python:3.7.1

steps:
- checkout
Expand All @@ -23,9 +23,33 @@ jobs:
sudo pip install nox
nox -f noxfile.py -s lint
Release:
docker:
- image: circleci/python:3.7.1

steps:
- checkout
- run:
command: |
sudo pip install --upgrade twine
sudo pip install --upgrade wheel
sudo pip install --upgrade setuptools
source scripts/twine_upload.sh
workflows:
version: 2
test:
jobs:
- Unit Test
- Lint
release:
jobs:
- Release:
filters:
# Runs for no branches and only for tags like "1.2.3"
branches:
ignore: /.*/
tags:
only:
- /^\d+\.\d+\.\d+$/
2 changes: 0 additions & 2 deletions twine_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ if [[ -z "$CIRCLE_TAG" ]]; then
exit 0
fi

python3 -m pip install --upgrade twine wheel setuptools

# Build the distribution and upload.
python3 setup.py sdist bdist_wheel
twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD

0 comments on commit 37eac2d

Please sign in to comment.