diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a134521d6b66551b0d8e7723b83d3f4623704553 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +upload: + stage: deploy + needs: [] + image: python:3.11 + rules: + - if: $CI_COMMIT_TAG + variables: + PRIVATE_REGISTRY_API_URL: "${PRIVATE_REGISTRY_API_URL}" + TWINE_PASSWORD: "${PRIVATE_REGISTRY_TOKEN_PASSWORD}" + TWINE_USERNAME: "${PRIVATE_REGISTRY_TOKEN_USERNAME}" + script: + - pip install "setuptools>=62.6" twine + - echo "Tag name used ${CI_COMMIT_TAG}" + - sed -i "s/v0.0.1-dev/$CI_COMMIT_TAG/g" src/__init__.py + - python -m build + - python -m twine upload --verbose --repository-url ${PRIVATE_REGISTRY_API_URL} dist/* + release: + tag_name: $CI_COMMIT_TAG + name: 'Release $CI_COMMIT_TAG' + description: 'Release created using the release-cli.'