Skip to content

Commit d1e9b23

Browse files
committed
[Copilot] try to fix failing deploy
1 parent 71b5606 commit d1e9b23

File tree

2 files changed

+64
-10
lines changed

2 files changed

+64
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

.github/workflows/release.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ jobs:
6363
6464
- name: Create Release for Core
6565
if: ${{ github.event.inputs.package == 'core' }}
66-
uses: actions/create-release@v1
67-
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
uses: softprops/action-gh-release@v1
6967
with:
7068
tag_name: core-v${{ github.event.inputs.version }}
71-
release_name: Core Release v${{ github.event.inputs.version }}
69+
name: Core Release v${{ github.event.inputs.version }}
7270
body: |
7371
Core Release v${{ github.event.inputs.version }}
7472
@@ -84,12 +82,10 @@ jobs:
8482

8583
- name: Create Release for Public Health
8684
if: ${{ github.event.inputs.package == 'public_health' }}
87-
uses: actions/create-release@v1
88-
env:
89-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
uses: softprops/action-gh-release@v1
9086
with:
9187
tag_name: public-health-v${{ github.event.inputs.version }}
92-
release_name: Public Health Release v${{ github.event.inputs.version }}
88+
name: Public Health Release v${{ github.event.inputs.version }}
9389
body: |
9490
Public Health Release v${{ github.event.inputs.version }}
9591

0 commit comments

Comments
 (0)