From 02714956d82365601e92d582b212096f31d522c7 Mon Sep 17 00:00:00 2001 From: Col Crunch Date: Wed, 15 Jan 2020 23:16:02 -0500 Subject: [PATCH] Add CI stage to deploy to pypi on tags. --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99d23e4c..af3ae02b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - "test" +- deploy before_script: - python -V @@ -19,3 +20,17 @@ test-3.7: image: python:3.7-stretch script: - tox -e py37 + +deploy_production: + stage: deploy + image: python:3.6-stretch + + before_script: + - pip install twine + + script: + - python setup.py sdist + - twine upload dist/* + + only: + - tags