forked from ali-zahedi/az-iranian-bank-gateways
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
51 lines (44 loc) · 967 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
49
50
stages:
- version
- release
variables:
AUTHOR: 'Ali Zahedigol'
.node: &node
image: node:latest
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 --generate-notes false --dry-run
- npx semantic-release
artifacts:
paths:
- VERSION.txt
release:
<<: *python
stage: release
environment:
name: release
script:
- echo "Version is $(cat VERSION.txt)"
- 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