Skip to content

Commit

Permalink
Autochange version on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri authored Aug 3, 2024
1 parent 64fe602 commit 948d875
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish Python 🐍 distributions 📦

on:
release:
types: [published]
tags:
- 'v*'

jobs:
build-and-publish:
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
],
)

0 comments on commit 948d875

Please sign in to comment.