Stop pushing deprecated khoj-assistant package to pypi

- Also skip uploading package version to it already exists on pypi
  This happens when a release is new khoj tagged release is created
This commit is contained in:
Debanjum Singh Solanky 2024-08-20 11:40:07 -07:00
parent f6ce2fd432
commit 5d59acd1f4

View file

@ -58,12 +58,7 @@ jobs:
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
rm -rf dist rm -rf dist
# Build PyPI Package: khoj # Build PyPI Package
pipx run build
# Build legacy PyPI Package: khoj-assistant
sed -i.bak '/^name = "khoj"$/s//name = "khoj-assistant"/' pyproject.toml
rm pyproject.toml.bak
pipx run build pipx run build
- name: 🌡️ Validate Python Package - name: 🌡️ Validate Python Package
@ -78,6 +73,8 @@ jobs:
name: khoj name: khoj
path: dist/khoj-*.whl path: dist/khoj-*.whl
- name: 📦 Publish Python Packages to PyPI - name: 📦 Publish Python Package to PyPI
if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master' if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@v1.8.14 uses: pypa/gh-action-pypi-publish@v1.8.14
with:
skip-existing: true