Skip to content

Commit

Permalink
Tagging releases and push
Browse files Browse the repository at this point in the history
  • Loading branch information
Farid-Karimli committed Aug 29, 2024
1 parent 8ea5331 commit 952d3d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Publish to PyPI

on:
push:
branches:
- main
tags:
- "v*"

Expand Down
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
import os

# Read the contents of requirements.txt
with open("requirements.txt") as f:
Expand All @@ -7,9 +8,17 @@
with open("README.md") as f:
readme = f.read()

# Tag is in the format v0.1.0, so we need to remove the v
git_tag = os.environ.get("GITHUB_REF_NAME", "")

if git_tag.startswith("v"):
version = git_tag[1:]
else:
version = git_tag

setup(
name="edubotics-core",
version="0.1.0",
version=version,
packages=find_packages(),
package_dir={"edubotics-core": "edubotics_core"},
python_requires=">=3.7",
Expand Down

0 comments on commit 952d3d0

Please sign in to comment.