Skip to content
Snippets Groups Projects

Build package

Merged Bryan Brancotte requested to merge build-package into main
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
.gitlab-ci.yml 0 → 100644
+ 21
0
upload:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
needs: []
image: python:3.11
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"
- pip install -e .[dev]
- echo "Tag name used ${CI_COMMIT_TAG}"
- >
if [[ -z "$CI_COMMIT_TAG" ]]; then
CI_COMMIT_TAG="v0.0.1a"
fi
- 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/*
Loading