mirror of
https://github.com/xtream1101/humblebundle-downloader.git
synced 2025-02-02 03:52:41 +01:00
Test publish using poetry
This commit is contained in:
parent
7369da336f
commit
177eaac3fc
@ -1,36 +1,21 @@
|
|||||||
image: python:3.7
|
image: python:3.10
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
|
||||||
- release
|
|
||||||
- package
|
- package
|
||||||
|
- release
|
||||||
|
|
||||||
flake8:
|
|
||||||
stage: test
|
|
||||||
except:
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- pip install tox
|
|
||||||
- tox -e flake8
|
|
||||||
|
|
||||||
pytest:
|
|
||||||
stage: test
|
|
||||||
except:
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- pip install tox
|
|
||||||
- tox -e py37
|
|
||||||
|
|
||||||
pypi-package:
|
pypi-package:
|
||||||
stage: package
|
stage: package
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
- update
|
||||||
script:
|
script:
|
||||||
- pip install twine
|
- apt-get update -y && apt-get install -y curl
|
||||||
- rm -f dist/*
|
- curl -sSL https://install.python-poetry.org | python3 -
|
||||||
- python setup.py sdist
|
- export PATH="/root/.local/bin:$PATH"
|
||||||
- twine upload -u ${PYPI_USER} -p ${PYPI_PASS} dist/*
|
- poetry build
|
||||||
|
- poetry publish
|
||||||
|
|
||||||
.write_permission: &write_permission |
|
.write_permission: &write_permission |
|
||||||
git config --global user.email "gitlab-ci"; git config --global user.name "gitlab-ci"
|
git config --global user.email "gitlab-ci"; git config --global user.name "gitlab-ci"
|
||||||
@ -43,6 +28,6 @@ tag:
|
|||||||
- main
|
- main
|
||||||
script:
|
script:
|
||||||
- *write_permission
|
- *write_permission
|
||||||
- export VERSION=$(echo $(python -c "import humblebundle_downloader._version as v; print(v.__version__)"))
|
- export VERSION=$(echo $(python -c "import importlib.metadata as v; print(v.version('humblebundle-downloader'))"))
|
||||||
- git tag -a $VERSION -m "Version created by gitlab-ci Build"
|
- git tag -a $VERSION -m "Version created by gitlab-ci release"
|
||||||
- git push origin $VERSION
|
- git push origin $VERSION
|
||||||
|
Loading…
x
Reference in New Issue
Block a user