diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 921b755..079d07d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,10 +50,20 @@ jobs: - name: Install build dependencies run: | python -m pip install --upgrade pip - pip install build setuptools-scm + pip install "build>=1.0" setuptools-scm - name: Build sdist - run: python -m build --sdist + run: | + python -m build --sdist + # Verify sdist filename uses underscores (PEP 625) + ls -la dist/ + if ls dist/cfd-python-*.tar.gz 1> /dev/null 2>&1; then + echo "ERROR: sdist has hyphenated name, renaming..." + for f in dist/cfd-python-*.tar.gz; do + mv "$f" "${f/cfd-python/cfd_python}" + done + fi + ls -la dist/ - name: Upload sdist uses: actions/upload-artifact@v4