File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,11 +40,27 @@ jobs:
4040 raise SystemExit(f"Tag {tag!r} does not match expected {expected!r}")
4141 PY
4242
43- - name : Build sdist
43+ - name : Build sdist (Python source distribution)
4444 run : |
4545 python -m pip install --upgrade pip
4646 python -m pip install build
47- python -m build --sdist
47+ python -m build --sdist --outdir dist
48+ python - <<'PY'
49+ from pathlib import Path
50+
51+ dist = Path("dist")
52+ sdists = sorted(dist.glob("fakegpu-*.tar.gz"))
53+ if not sdists:
54+ raise SystemExit("No sdist found in dist/")
55+
56+ src = sdists[-1]
57+ base = src.name.removesuffix(".tar.gz")
58+ dst = dist / f"{base}-python-sdist.tar.gz"
59+ if dst.exists():
60+ dst.unlink()
61+ src.rename(dst)
62+ print(f"sdist: {dst}")
63+ PY
4864
4965 - name : Build wheel (manylinux x86_64)
5066 uses : pypa/cibuildwheel@v2.21.3
5874 if : startsWith(github.ref, 'refs/tags/')
5975 uses : softprops/action-gh-release@v2
6076 with :
61- files : dist/*
77+ files : |
78+ dist/*.whl
79+ dist/*-python-sdist.tar.gz
6280 generate_release_notes : true
You can’t perform that action at this time.
0 commit comments