mirror of
https://github.com/gogcom/galaxy-integrations-python-api.git
synced 2025-12-23 23:18:15 -05:00
33 lines
778 B
YAML
33 lines
778 B
YAML
image: registry-gitlab.gog.com/docker/python:3.7.3
|
|
|
|
stages:
|
|
- test
|
|
- deploy
|
|
|
|
test_package:
|
|
stage: test
|
|
script:
|
|
- pip install -r requirements-dev.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
|