Skip to content
Snippets Groups Projects
Commit a9077844 authored by Julian Rother's avatar Julian Rother
Browse files

Added .gitlab-ci.yml to auto-publish tags as pip packages

parent cc4fd2f6
No related branches found
No related tags found
No related merge requests found
Pipeline #6975 passed
publish:
stage: deploy
image: python:3.7
script:
- pip install build twine
- PACKAGE_VERSION="${CI_COMMIT_TAG#v}" python -m build
- python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
rules:
- if: '$CI_COMMIT_TAG =~ /v[0-9]+[.][0-9]+[.][0-9]+.*/'
import os
import setuptools
with open('README.md', 'r', encoding='utf-8') as f:
......@@ -5,7 +6,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setuptools.setup(
name='ldapserver',
version='0.0.1.dev0',
version=os.environ.get('PACKAGE_VERSION', 'local'),
author='Julian Rother',
author_email='python-ldapserver@jrother.eu',
description='LDAP server request handler',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment