diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0ebde86c756a315ccbb39a02f7ade2f29c5dfde..fe838f1c05656db8706e0f55c50e1f5f1662bc10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - lint - test + - release pre-commit: stage: lint @@ -25,7 +26,7 @@ pre-commit: test: stage: test image: $project:$version-slim - before_script: + before_script: &before_script - apt-get update - >- apt-get install -y @@ -66,3 +67,32 @@ test: - "2.7" - "3.6" - "3.7" + +upload: + stage: release + image: python:3.6 + before_script: *before_script + script: + - mv pypirc $HOME/.pypirc + - pipenv run build + - pipenv run upload + variables: *variables + cache: *cache + rules: + - if: $CI_COMMIT_TAG + artifacts: + paths: + - dist/*.whl + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - echo GitLab release + rules: + - if: $CI_COMMIT_TAG + release: + name: Release $CI_COMMIT_TAG + tag_name: $CI_COMMIT_TAG + ref: $CI_COMMIT_TAG + description: GitLab release $CI_COMMIT_TAG diff --git a/README.rst b/README.rst index 2edc1d415a46d36250131d14648a7fe71b466e3c..b16919910547c8c6efa1bc816de87f5ffef3b37e 100644 --- a/README.rst +++ b/README.rst @@ -93,8 +93,3 @@ Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website <https://www.shore.co.il/>`_. Patches are welcome via `git send-email <http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located at: https://git.shore.co.il/nimrod/. - -Pending tasks -------------- - -- Release on tagged commits to PyPI in CI.