Skip to content

Commit 8fe7046

Browse files
authored
updates to enable automatic deployment (#95)
* updates to enable automatic deployment * fixed a typo * hopefully fixed broken release system * ensured that we have pypirc being templated correctly * added twine logic, should work * removing pypitest as it's not directly compatible with twine * commenting out all other work to verify deployment system * missed a $ * swapped out the hidden environment variable * release candidate
1 parent ccc4e63 commit 8fe7046

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,30 @@ stages:
44
- python37
55
- python38
66
- python39
7+
- deploy
78

89
variables:
910
PROJECT_NAME: algorithmia-python
1011
DOCKER_HOST: tcp://docker:2375/
1112
DOCKER_DRIVER: overlay2
1213
RUNNING_ON_BUILD_SERVER: "true"
14+
TWINE_USERNAME: __token__
15+
CLIENT_VERSION: $CI_COMMIT_TAG
16+
17+
18+
deploy:
19+
stage: deploy
20+
only:
21+
- tags
22+
image: python:3.7
23+
script:
24+
# - export CLIENT_VERSION=$(git describe --abbrev=0 2>/dev/null || echo '')
25+
- echo $CLIENT_VERSION
26+
- python -m pip install --upgrade pip
27+
- pip install wheel twine setuptools
28+
- python setup.py sdist bdist_wheel
29+
- python3 setup.py sdist bdist_wheel --universal
30+
- twine upload -r pypi dist/*
1331

1432
test:
1533
stage: test

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='algorithmia',
7-
version='1.8.2',
7+
version=os.environ.get('CLIENT_VERSION', '0.0.0'),
88
description='Algorithmia Python Client',
99
long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithms in Algorithmia.',
1010
url='http://github.com/algorithmiaio/algorithmia-python',

0 commit comments

Comments
 (0)