Commit 5cda92b8 authored by Jean-Baptiste Delisle's avatar Jean-Baptiste Delisle
Browse files

Deploy on pypi

parent 2e281326
Pipeline #29052 passed with stages
in 7 minutes and 29 seconds
......@@ -73,6 +73,10 @@ Release and deploy on Production:
- git config --global user.name 'Gitlab CI'
- git config --global user.email ''
- git remote set-url origin "https://gitlab-ci-token:$RELEASE_TOKEN@gitlab.unige.ch/jean-baptiste.delisle/samsam.git"
- export PATH=$PATH:$PWD/../miniconda/bin/
- source $PWD/../miniconda/etc/profile.d/conda.sh
- conda env create -f samsam_env.yml
- conda activate samsam
script:
# Tag
- VERSION=`grep __version__ samsam/__info__.py | sed 's/.*version__ = "//' | sed 's/"//'`
......@@ -82,10 +86,12 @@ Release and deploy on Production:
- CHANGES=`cat CHANGES.txt`
# Add release on gitlab (via gitlab API)
- curl -X POST -H "PRIVATE-TOKEN:$RELEASE_TOKEN" -F "name=Release samsam $TAG_VERSION" -F "tag_name=$TAG_VERSION" -F "ref=$TAG_VERSION" -F "description=Changes:$CHANGES" 'https://gitlab.unige.ch/api/v4/projects/4476/releases'
# Deploy on production
# Deploy on https://obswww.unige.ch/~delisle/
- cp dist/*.tar.gz /www/people/delisle/public/samsam
- rm -rf /www/people/delisle/public/samsam/doc/*
- cp -R doc/build/html/* /www/people/delisle/public/samsam/doc
# Deploy on Pypi
- python -m twine upload dist/*.tar.gz
# Upgrade to next version
- MAJOR_DIGIT=`echo $VERSION | awk -F. '{print $1}'`
- MINOR_DIGIT=`echo $VERSION | awk -F. '{print $2}'`
......@@ -98,4 +104,7 @@ Release and deploy on Production:
- git add samsam/__info__.py
- git commit -m "Upgrade project to next version $NEW_VERSION"
- git push origin master --quiet
after_script:
- conda deactivate
- conda env remove -n samsam
when: manual
......@@ -23,4 +23,4 @@ __author__ = 'Jean-Baptiste Delisle'
__author_email__ = 'jean-baptiste.delisle@unige.ch'
__license__ = 'GPLv3'
__url__ = 'https://gitlab.unige.ch/jean-baptiste.delisle/samsam'
__version__ = "0.1.3"
__version__ = "1.0.0"
......@@ -10,4 +10,5 @@ dependencies:
- numpydoc
- matplotlib
- ipython
- corner
\ No newline at end of file
- corner
- twine
......@@ -25,6 +25,8 @@ path = os.path.abspath(os.path.dirname(__file__))
info = {}
with open(os.path.join(path, 'samsam', '__info__.py'), 'r') as f:
exec(f.read(), info)
with open('README.rst', 'r', encoding='utf-8') as readme:
long_description = readme.read()
setup(name=info['__title__'],
version=info['__version__'],
......@@ -32,6 +34,7 @@ setup(name=info['__title__'],
author_email=info['__author_email__'],
license=info['__license__'],
description=info['__description__'],
long_description=long_description,
url=info['__url__'],
packages=['samsam'],
python_requires='>=3.6',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment