2020-10-10 00:40:52 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: validate
|
|
|
|
image: python:3
|
|
|
|
commands:
|
2020-10-10 11:44:06 +00:00
|
|
|
- pip install mypy pytest
|
2020-10-10 13:39:34 +00:00
|
|
|
- mypy bytetrie/*.py
|
2020-10-10 11:44:06 +00:00
|
|
|
- python -m pytest
|
2020-10-10 00:40:52 +00:00
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: python:3
|
|
|
|
environment:
|
|
|
|
TWINE_USERNAME: __token__
|
|
|
|
TWINE_PASSWORD:
|
|
|
|
from_secret: pypi_test_token
|
|
|
|
commands:
|
|
|
|
- pip install twine setuptools wheel
|
|
|
|
- python setup.py sdist bdist_wheel
|
|
|
|
- twine check dist/*
|
|
|
|
- twine upload --repository testpypi dist/*
|
2020-10-10 13:59:26 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
2020-10-11 19:56:21 +00:00
|
|
|
|
|
|
|
- name: promote
|
|
|
|
image: python:3
|
|
|
|
environment:
|
|
|
|
TWINE_USERNAME: __token__
|
|
|
|
TWINE_PASSWORD:
|
|
|
|
from_secret: pypi_token
|
|
|
|
commands:
|
|
|
|
- pip install twine setuptools wheel
|
|
|
|
- python setup.py sdist bdist_wheel
|
|
|
|
- twine check dist/*
|
|
|
|
- twine upload dist/*
|
|
|
|
when:
|
2020-10-11 20:08:30 +00:00
|
|
|
event:
|
|
|
|
- promote
|