From b654b570e55eda0109126d96aa2a4d176972ea9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sat, 18 Jul 2020 18:35:22 +0200 Subject: [PATCH] Build release archives and wheels from the CI --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 073fdbd..a5a6ca8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: python stages: - linters - tests + - release variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/vendor/pip" @@ -11,6 +12,10 @@ cache: paths: - vendor +# --- +# Linters +# --- + linters: stage: linters before_script: @@ -21,6 +26,10 @@ linters: - isort --check --diff . - flake8 --exit-zero authens +# --- +# Test suite +# --- + before_script: - mkdir -p vendor/{apt,pip} - apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq python3-dev libldap2-dev libsasl2-dev @@ -52,3 +61,21 @@ python38: script: - tox -e py38-django22 - tox -e py38-django30 + +# --- +# Release artifacts +# --- + +build_wheels: + stage: release + image: python + only: + - tags + artifacts: + paths: + - dist/* + when: on_success + before_script: + - pip install --upgrade setuptools wheel + script: + - python setup.py sdist bdist_wheel