@@ -37,14 +37,43 @@ jobs:
3737 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3838 echo "Available core tags:"
3939 git tag --list "core-v*" | head -10
40+ echo "Current git describe for core tags:"
41+ git describe --tags --match "core-v*" || echo "No core tags found"
42+ echo "Git log --oneline (last 5):"
43+ git log --oneline -5
4044 - name : Install dependencies
4145 run : |
4246 python --version
4347 uv pip install --system setuptools wheel build
48+ - name : Debug setuptools_scm for core
49+ run : |
50+ cd libs/core
51+ python -c "
52+ import setuptools_scm
53+ try:
54+ version = setuptools_scm.get_version()
55+ print(f'setuptools_scm detected version: {version}')
56+ except Exception as e:
57+ print(f'setuptools_scm error: {e}')
58+ import traceback
59+ traceback.print_exc()
60+ "
4461 - name : Build core
4562 run : |
4663 cd libs/core
47- python -m build
64+ # Try auto-detection first, fall back to tag-based version if needed
65+ if python -c "import setuptools_scm; setuptools_scm.get_version()" > /dev/null 2>&1; then
66+ echo "Using setuptools_scm auto-detected version"
67+ python -m build
68+ elif [[ "${{ github.event_name }}" == "release" && "${{ github.event.release.tag_name }}" == core-v* ]]; then
69+ TAG_NAME="${{ github.event.release.tag_name }}"
70+ VERSION="${TAG_NAME#core-v}"
71+ echo "Auto-detection failed, using explicit version from tag: $VERSION"
72+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SIM_SCI_TEST_MONOREPO_CORE="$VERSION" python -m build
73+ else
74+ echo "No version could be determined, trying build anyway"
75+ python -m build
76+ fi
4877 - name : Publish core to PyPI
4978 uses : pypa/gh-action-pypi-publish@release/v1
5079 with :
@@ -84,14 +113,43 @@ jobs:
84113 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
85114 echo "Available public health tags:"
86115 git tag --list "public-health-v*" | head -10
116+ echo "Current git describe for public health tags:"
117+ git describe --tags --match "public-health-v*" || echo "No public health tags found"
118+ echo "Git log --oneline (last 5):"
119+ git log --oneline -5
87120 - name : Install dependencies
88121 run : |
89122 python --version
90123 uv pip install --system setuptools wheel build
124+ - name : Debug setuptools_scm for public health
125+ run : |
126+ cd libs/public_health
127+ python -c "
128+ import setuptools_scm
129+ try:
130+ version = setuptools_scm.get_version()
131+ print(f'setuptools_scm detected version: {version}')
132+ except Exception as e:
133+ print(f'setuptools_scm error: {e}')
134+ import traceback
135+ traceback.print_exc()
136+ "
91137 - name : Build public health
92138 run : |
93139 cd libs/public_health
94- python -m build
140+ # Try auto-detection first, fall back to tag-based version if needed
141+ if python -c "import setuptools_scm; setuptools_scm.get_version()" > /dev/null 2>&1; then
142+ echo "Using setuptools_scm auto-detected version"
143+ python -m build
144+ elif [[ "${{ github.event_name }}" == "release" && "${{ github.event.release.tag_name }}" == public-health-v* ]]; then
145+ TAG_NAME="${{ github.event.release.tag_name }}"
146+ VERSION="${TAG_NAME#public-health-v}"
147+ echo "Auto-detection failed, using explicit version from tag: $VERSION"
148+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SIM_SCI_TEST_MONOREPO_PUBLIC_HEALTH="$VERSION" python -m build
149+ else
150+ echo "No version could be determined, trying build anyway"
151+ python -m build
152+ fi
95153 - name : Publish public health to PyPI
96154 uses : pypa/gh-action-pypi-publish@release/v1
97155 with :
0 commit comments