Skip to content

Commit

Permalink
updates to enable automatic deployment (#95)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
zeryx committed Jun 29, 2021
1 parent ccc4e63 commit 8fe7046
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -4,12 +4,30 @@ stages:
- python37
- python38
- python39
- deploy

variables:
PROJECT_NAME: algorithmia-python
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
RUNNING_ON_BUILD_SERVER: "true"
TWINE_USERNAME: __token__
CLIENT_VERSION: $CI_COMMIT_TAG


deploy:
stage: deploy
only:
- tags
image: python:3.7
script:
# - export CLIENT_VERSION=$(git describe --abbrev=0 2>/dev/null || echo '')
- echo $CLIENT_VERSION
- python -m pip install --upgrade pip
- pip install wheel twine setuptools
- python setup.py sdist bdist_wheel
- python3 setup.py sdist bdist_wheel --universal
- twine upload -r pypi dist/*

test:
stage: test
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@

setup(
name='algorithmia',
version='1.8.2',
version=os.environ.get('CLIENT_VERSION', '0.0.0'),
description='Algorithmia Python Client',
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.',
url='http://github.com/algorithmiaio/algorithmia-python',
Expand Down

0 comments on commit 8fe7046

Please sign in to comment.