Upload to PyPI using tox
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>spacecruft
parent
091c61dd65
commit
b60e7182d1
|
@ -6,7 +6,6 @@ variables:
|
|||
GITLAB_CI_IMAGE_OPENAPI_GENERATOR_CLI: 'openapitools/openapi-generator-cli'
|
||||
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
|
||||
GITLAB_CI_PYPI_TOX: 'tox~=3.14.0'
|
||||
GITLAB_CI_PYPI_TWINE: 'twine~=1.13.0'
|
||||
stages:
|
||||
- schema
|
||||
- api
|
||||
|
@ -83,7 +82,7 @@ build:
|
|||
- tox -e build
|
||||
- cd satnogs-db-api-client
|
||||
- rm -rf dist
|
||||
- python setup.py sdist bdist_wheel
|
||||
- tox -e build
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
|
@ -143,11 +142,10 @@ deploy:
|
|||
stage: deploy
|
||||
image: ${GITLAB_CI_IMAGE_PYTHON}
|
||||
before_script:
|
||||
- pip install "$GITLAB_CI_PYPI_TWINE"
|
||||
- pip install "$GITLAB_CI_PYPI_TOX"
|
||||
script:
|
||||
- rm -rf dist
|
||||
- python setup.py sdist bdist_wheel
|
||||
- twine upload -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD" dist/*
|
||||
- tox -e "upload"
|
||||
only:
|
||||
refs:
|
||||
- tags
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
[tox]
|
||||
envlist = build
|
||||
|
||||
[depversions]
|
||||
twine = 3.1.1
|
||||
|
||||
[testenv:build]
|
||||
skip_install = True
|
||||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
[testenv:upload]
|
||||
deps =
|
||||
twine=={[depversions]twine}
|
||||
skip_install = True
|
||||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload -u "{env:PYPI_USERNAME}" -p "{env:PYPI_PASSWORD}" dist/*
|
9
tox.ini
9
tox.ini
|
@ -8,6 +8,7 @@ yapf = 0.27.0
|
|||
pylint = 2.3.1
|
||||
pylint_django = 2.0.9
|
||||
sphinx_rtd_theme = 0.4.3
|
||||
twine = 3.1.1
|
||||
|
||||
[testenv:flake8]
|
||||
deps =
|
||||
|
@ -53,6 +54,14 @@ skip_install = True
|
|||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
[testenv:upload]
|
||||
deps =
|
||||
twine=={[depversions]twine}
|
||||
skip_install = True
|
||||
commands =
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload -u "{env:PYPI_USERNAME}" -p "{env:PYPI_PASSWORD}" dist/*
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
sphinx_rtd_theme=={[depversions]sphinx_rtd_theme}
|
||||
|
|
Loading…
Reference in New Issue