From d7c30cba05a2bd6b1dac269d9ab411b7d40581c0 Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:39:01 -0800 Subject: [PATCH] Fix tag script --- .github/workflows/tag_and_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag_and_publish.yml b/.github/workflows/tag_and_publish.yml index a120b59..85333b3 100644 --- a/.github/workflows/tag_and_publish.yml +++ b/.github/workflows/tag_and_publish.yml @@ -19,9 +19,9 @@ jobs: - name: Extract version from __init__.py and package name from pyproject.toml id: get_version_and_name run: | - package_name=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])") + package_name=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])") package_name=${package_name//-/_} - version=$(python -c "import re; + version=$(uv run python -c "import re; with open(f'./src/${package_name}/__init__.py', 'r') as f: content = f.read(); match = re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', content);