Skip to content
Snippets Groups Projects
Commit a9b61892 authored by Christian Boettcher's avatar Christian Boettcher
Browse files

only build on release

parent 92758e45
No related branches found
No related tags found
No related merge requests found
Pipeline #86132 passed
......@@ -40,9 +40,13 @@ test_package:
build_package:
stage: build
only:
variables:
- $CI_COMMIT_TAG =~ /release/
script:
- pip install -r requirements.txt
- sed -i "s_VERSION_0.0.1_g" setup.cfg
- VER=${CI_COMMIT_TAG#*-}
- sed -i "s_VERSION_${VER}_g" setup.cfg
- python -m build
artifacts:
paths:
......@@ -56,6 +60,4 @@ publish_package:
stage: publish
script:
- pip install twine
- VER=${CI_COMMIT_TAG#*-}
- sed -i "s_VERSION_${VER}_g" setup.cfg
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment