-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
48 lines (42 loc) · 871 Bytes
/
.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
stages:
- version
- production
variables:
AUTHOR: 'Ali Zahedigol'
.node: &node
image: node:13
tags:
- node
.python: &python
image: python:3.7
tags:
- python
version:
# Requires Node >= 10.13 version
<<: *node
stage: version
only:
refs:
- master
- develop
script:
- npm install @semantic-release/gitlab @semantic-release/exec @semantic-release/changelog
- npx semantic-release
artifacts:
paths:
- VERSION.txt
production:
<<: *python
stage: production
environment:
name: production
script:
- sed -i "s/version='1.0.0',/version='$(cat VERSION.txt)',/g" setup.py
- pip install twine
- python setup.py sdist bdist_wheel
- TWINE_PASSWORD=${TWINE_TOKEN} TWINE_USERNAME=${TWINE_USERNAME} python -m twine upload dist/*
only:
- master
- develop
dependencies:
- version