diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 33560b6..894c650 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -1,8 +1,8 @@ name: Publish Python 🐍 distributions 📦 on: - release: - types: [published] + tags: + - 'v*' jobs: build-and-publish: @@ -14,6 +14,10 @@ jobs: uses: actions/setup-python@v3 with: python-version: "3.11" + - name: Change version + run: | + VERSION=${{ github.ref_name }} + sed -i -e "s/version='1.0.0'/version='${VERSION:1}'/g" ${{ github.workspace }}/setup.py - name: Install dependencies run: | python -m ensurepip diff --git a/setup.py b/setup.py index 3a9cb4b..0c124c2 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,18 @@ from setuptools import setup, find_packages -with open("README.md", "r") as readme_file: +with open('README.md', 'r') as readme_file: readme = readme_file.read() setup( - name="logging_profcomff", - version="2023.10.29", - author="Semyon Grigoriev", + name='logging_profcomff', + version='1.0.0', # Не менять, работает автоматика + author='Semyon Grigoriev', long_description=readme, - long_description_content_type="text/markdown", - url="https://github.com/profcomff/logging-lib", + long_description_content_type='text/markdown', + url='https://github.com/profcomff/logging-lib', packages=find_packages(), - install_requires=["setuptools"], + install_requires=['setuptools'], classifiers=[ - "Programming Language :: Python :: 3.11", + 'Programming Language :: Python :: 3.11', ], )