From 1944abf097b4829059e10d138eaa4656d19394f4 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 18 Dec 2020 02:27:45 +0200
Subject: [PATCH] More generic upload Pipenv script.

---
 .gitlab-ci.yml | 2 +-
 Pipfile        | 2 +-
 README.rst     | 6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e028b27..2daf3e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,7 +75,7 @@ upload:
   script:
     - mv "$pypirc" $HOME/.pypirc
     - pipenv run build
-    - pipenv run upload
+    - pipenv run upload dist/*
   variables: *variables
   cache: *cache
   rules:
diff --git a/Pipfile b/Pipfile
index 9ed9870..0a19f57 100644
--- a/Pipfile
+++ b/Pipfile
@@ -13,7 +13,7 @@ template = {editable = true,path = "."}
 lint = "pre-commit run --all-files"
 build = "python setup.py bdist_wheel"
 clean = "git clean -fdX"
-upload = "sh -c 'twine upload dist/*'"
+upload = "twine upload"
 bats = "bats -t tests/"
 check = "sh -c 'rm -rf dist/ && python setup.py bdist_wheel && twine check dist/*'"
 doctest = "sh -c 'python -m doctest template/*.py'"
diff --git a/README.rst b/README.rst
index b169199..1d2ba6e 100644
--- a/README.rst
+++ b/README.rst
@@ -77,8 +77,10 @@ Release
 
 Release requires `Pipenv <https://docs.pipenv.org>`_. To bump the version run
 :code:`pipenv run bumpversion major|minor|patch` to update the version and git
-commit and tag. Then run :code:`pipenv run upload` to upload the new version to
-PyPI and :code:`git push --follow-tags` to push the git commit and tag.
+commit and tag the changes, then run :code:`git push --follow-tags` to push the
+git commit and tag. The GitLab CI will then build and upload a release to PyPI.
+To manually upload to PyPI run :code:`pipenv run build` to build the Python
+package and :code:`pipenv run upload -s dist/*` to upload a signed version.
 
 License
 -------
-- 
GitLab