Configure automatic release with CircleCI

This commit is contained in:
Brian Quinlan
2019-04-02 06:01:45 -07:00
parent 948372266c
commit 37eac2d785
2 changed files with 25 additions and 3 deletions

View File

@@ -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
@@ -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+$/

View File

@@ -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