43 lines
935 B
YAML
43 lines
935 B
YAML
kind: pipeline
|
|
name: default
|
|
steps:
|
|
- name: tests
|
|
image: python:3.6
|
|
commands:
|
|
- env
|
|
- python setup.py test
|
|
|
|
# Auto build to pypi test
|
|
- name: deploy-test
|
|
image: registry.gitlab.com/olymk2/drone-pypi
|
|
pull: true
|
|
settings:
|
|
PYPI_USERNAME:
|
|
from_secret: PYPI_TEST_USERNAME
|
|
PYPI_PASSWORD:
|
|
from_secret: PYPI_TEST_PASSWORD
|
|
PYPI_REPOSITORY:
|
|
from_secret: PYPI_TEST_REPOSITORY
|
|
commands:
|
|
- env
|
|
- echo "__version__=$(date +'%y%m%d.%H%M')" > ./eorg/version.py
|
|
- python3 /bin/upload
|
|
|
|
- name: deploy
|
|
image: registry.gitlab.com/olymk2/drone-pypi
|
|
pull: true
|
|
settings:
|
|
PYPI_USERNAME:
|
|
from_secret: PYPI_LIVE_USERNAME
|
|
PYPI_PASSWORD:
|
|
from_secret: PYPI_LIVE_PASSWORD
|
|
PYPI_REPOSITORY:
|
|
from_secret: PYPI_LIVE_REPOSITORY
|
|
commands:
|
|
- env
|
|
- echo "__version__=${DRONE_TAG}"
|
|
- echo "__version__=${DRONE_TAG}" > eorg/version.py
|
|
when:
|
|
event:
|
|
- tag
|