fix: derive pip version from git tag instead of setuptools_scm (#2573)

Co-authored-by: Nazim <nazim@openclaw.ai>
This commit is contained in:
al-munazzim 2026-03-20 11:02:54 +01:00 committed by GitHub
parent bc58dfab2a
commit 9d83b3a620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,13 @@ jobs:
run: pip install build==0.10.0
- name: Build package
run: python3 -m build
run: |
# Derive PEP 440 version from git tag (pre→rc mapping)
# Avoids setuptools_scm picking wrong tag when multiple tags share a commit
VERSION=${GITHUB_REF#refs/tags/v}
PEP_VERSION=$(echo "$VERSION" | sed 's/-pre/rc/')
echo "Building version: $PEP_VERSION"
SETUPTOOLS_SCM_PRETEND_VERSION=$PEP_VERSION python3 -m build
- name: Upload pip artifacts
uses: actions/upload-artifact@v4