diff --git a/gitlab/deploy.sh b/gitlab/deploy.sh
index b8fe6bf0eaa58daf7552c2e6d22bf23436821e10..5da571c92920090c1e379e7913ba49f613feda0b 100755
--- a/gitlab/deploy.sh
+++ b/gitlab/deploy.sh
@@ -15,6 +15,13 @@ if [ "${VISIBILITY}" != "public" ]; then
   exit 0
 fi
 
+log_info "Creating source distribution..."
+run_cmd $(PREFIX)/bin/python setup.py check sdist --formats zip
+if [ $? != 0 ]; then
+  log_error "Could not create source distribution zip file"
+  exit 1
+fi
+
 log_info "Uploading package to ${PYPISERVER} on behalf of ${PYPIUSER}..."
 twine register --username ${PYPIUSER} --password ${PYPIPASS} dist/*.zip
 twine upload --username ${PYPIUSER} --password ${PYPIPASS} dist/*.zip