-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
97 lines (90 loc) · 1.76 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
stages:
- test
- build
- upload
image: "registry.gitlab.com/gbdlin/django-admin-toolbox/ansible:latest"
chceck_flake8:
stage: test
tags:
- python3
- pip
script:
- "pip install flake8"
- "flake8 admin_toolbox/"
only:
- branches
- tags
build:sdist:
stage: build
tags:
- python3
- setuptools
script:
- "git describe --all"
- "python setup.py sdist"
only:
- '/^v(\d+!)?\d+(\.\d+)*((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/'
except:
- branches
artifacts:
name: '$CI_COMMIT_REF_NAME-sdist'
paths:
- dist/
build:wheel:
stage: build
tags:
- python3
- setuptools
script:
- "git describe --all"
- "python setup.py bdist_wheel"
only:
- '/^v(\d+!)?\d+(\.\d+)*((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/'
except:
- branches
artifacts:
name: '$CI_COMMIT_REF_NAME-wheel'
paths:
- dist/
upload:pypi:
stage: upload
tags:
- python3
- setuptools
script:
- "twine upload dist/* -u $PYPI_USER -p $PYPI_PASSWORD"
only:
- '/^v(\d+!)?\d+(\.\d+)*((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/'
except:
- branches
dependencies:
- build:sdist
- build:wheel
upload:github:
stage: upload
tags:
- python3
- setuptools
script:
- "python tools/releases_uploader.py github $CI_COMMIT_REF_NAME"
only:
- '/^v(\d+!)?\d+(\.\d+)*((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/'
except:
- branches
dependencies:
- build:sdist
- build:wheel
upload:gitlab:
stage: upload
tags:
- python3
- setuptools
script:
- "python tools/releases_uploader.py gitlab $CI_COMMIT_REF_NAME"
only:
- '/^v(\d+!)?\d+(\.\d+)*((a|b|rc)\d+)?(\.post\d+)?(\.dev\d+)?$/'
except:
- branches
dependencies:
- build:sdist
- build:wheel