ci: added semver
This commit is contained in:
parent
428a13ceeb
commit
9c0bd1e194
@ -24,4 +24,30 @@ pytest:
|
|||||||
script:
|
script:
|
||||||
- pytest -v --random-order ./tests
|
- pytest -v --random-order ./tests
|
||||||
|
|
||||||
|
semver:
|
||||||
|
stage: Deploy
|
||||||
|
needs: ["tests"]
|
||||||
|
script:
|
||||||
|
- git config --global user.name "ci_update_bot"
|
||||||
|
- git config --global user.email "ci_update_bot@bec.ch"
|
||||||
|
- git checkout "$CI_COMMIT_REF_NAME"
|
||||||
|
- git reset --hard origin/"$CI_COMMIT_REF_NAME"
|
||||||
|
|
||||||
|
# delete all local tags
|
||||||
|
- git tag -l | xargs git tag -d
|
||||||
|
- git fetch --tags
|
||||||
|
- git tag
|
||||||
|
|
||||||
|
# build
|
||||||
|
- pip install python-semantic-release wheel
|
||||||
|
- export GL_TOKEN=$CI_UPDATES
|
||||||
|
- export REPOSITORY_USERNAME=__token__
|
||||||
|
- export REPOSITORY_PASSWORD=$CI_PYPI_TOKEN
|
||||||
|
- >
|
||||||
|
semantic-release publish -v DEBUG
|
||||||
|
-D version_variable=./setup.py:__version__
|
||||||
|
-D hvcs=gitlab
|
||||||
|
|
||||||
|
allow_failure: false
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "master"'
|
Loading…
x
Reference in New Issue
Block a user