forked from gogcom/galaxy-integrations-python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
32 lines (29 loc) · 791 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
image: registry-gitlab.gog.com/galaxy-client/gitlab-ci-tools:latest
stages:
- test
- deploy
test_package:
stage: test
script:
- pip install -r requirements.txt
- pytest
except:
- tags
deploy_package:
stage: deploy
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- pip install twine wheel
- rm -rf dist
- export VERSION=$(python setup.py --version)
- python setup.py sdist --formats=gztar bdist_wheel
- twine upload dist/*
- curl -X POST --silent --show-error --fail
"https://gitlab.gog.com/api/v4/projects/${CI_PROJECT_ID}/repository/tags?tag_name=${VERSION}&ref=${CI_COMMIT_REF_NAME}&private_token=${PACKAGE_DEPLOYER_API_TOKEN}"
when: manual
only:
- master
except:
- tags