-
Notifications
You must be signed in to change notification settings - Fork 20
/
.gitlab-ci.yml
46 lines (41 loc) · 1.09 KB
/
.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
stages:
- test
- release
variables:
DOCKER_IMAGE_PYTHON: python:3.8-buster
PYPI_TEST_TOKEN: ${PYPI_TEST_TOKEN}
PYPI_TOKEN: ${PYPI_TOKEN}
flake8:
image: $DOCKER_IMAGE_PYTHON
stage: test
script:
- pip install -U flake8
- flake8
allow_failure: true
pypi_test_release:
image: $DOCKER_IMAGE_PYTHON
stage: release
cache: {}
script:
- pip install -U twine wheel
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload --verbose --repository-url https://test.pypi.org/legacy/ --username __token__ --password ${PYPI_TEST_TOKEN} dist/*
- pip install --no-deps --index-url https://test.pypi.org/simple/ django-popolo
- pip uninstall django-popolo -y
only:
- tags
pypi_official_release:
image: $DOCKER_IMAGE_PYTHON
stage: release
cache: {}
script:
- pip install -U twine wheel
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload --verbose --username __token__ --password ${PYPI_TOKEN} dist/*
- pip install django-popolo
- pip uninstall django-popolo -y
only:
- tags
when: manual