Skip to content

Commit

Permalink
version from release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sinina committed Aug 27, 2023
1 parent 654f941 commit b4637a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
environment:
name: pypi
url: https://pypi.org/p/yeti-switch-api
RELEASE_VERSION: ${{github.ref}}
permissions:
id-token: write
contents: read
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
from setuptools import setup
from yeti_switch_api import __version__
from packaging.version import Version
import os

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

with open("requirements.txt", "r", encoding="utf-8") as fh:
requirements = fh.read().split("\n")

version_string = os.environ.get("RELEASE_VERSION", "0.0.0.dev0")
version = Version(version_string)

setup(
name="yeti_switch_api",
version=__version__,
version=str(version),
author="Denys Talakevych",
author_email="<senid231@gmail.com>",
url="https://github.com/senid231/yeti-admin-python",
Expand Down

0 comments on commit b4637a7

Please sign in to comment.