Skip to content

Commit

Permalink
github workflow for pip release
Browse files Browse the repository at this point in the history
  • Loading branch information
nehadimri1991 committed May 6, 2024
1 parent 81208ed commit 4bf76c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,5 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
latest_tag=$(git describe --tags --abbrev=0)
git tag -a "$latest_tag" -m "Version $latest_tag"
git push origin "$latest_tag"
python setup.py sdist bdist_wheel
twine upload dist/*
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from setuptools import setup, find_packages
import subprocess

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

# Fetch latest tag
latest_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"]).strip().decode("utf-8")

setup(
name='optihood',
packages=find_packages(),
#version="0.1",
version=latest_tag,
author="Institute for Solar Technology (SPF), OST Rapperswil",
author_email="neha.dimri@ost.ch",
description="optihood optimization framework",
Expand All @@ -20,6 +24,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
],
setup_requires=["setuptools-git-versioning"],
#setup_requires=["setuptools-git-versioning"],
python_requires=">=3.9",
)

0 comments on commit 4bf76c9

Please sign in to comment.