-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
55 lines (49 loc) · 1.04 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
47
48
49
50
51
52
53
54
55
---
image: python:3
stages:
- verify
- build
- publish
before_script:
- pip install tox
pycodestyle:
stage: verify
script: tox -e pycodestyle
pylint:
stage: verify
script: tox -e pylint
package-build:
stage: build
script: python setup.py sdist bdist_wheel
artifacts:
expire_in: 1 day
paths:
- build/
- dist/
only:
- tags
- master@bramwelt/newsreader
publish-to-test:
stage: publish
variables:
TWINE_USERNAME: $PYPI_TEST_USERNAME
TWINE_PASSWORD: $PYPI_TEST_PASSWORD
before_script:
- pip install twine
script: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
only:
- master@bramwelt/newsreader
dependencies:
- package-build
publish-to-prod:
stage: publish
variables:
TWINE_USERNAME: $PYPI_PROD_USERNAME
TWINE_PASSWORD: $PYPI_PROD_PASSWORD
before_script:
- pip install twine
script: twine upload dist/*
only:
- tags
dependencies:
- package-build