From 4a1304b929c979fbc742de455b2ecac107540417 Mon Sep 17 00:00:00 2001 From: Tom Begley Date: Wed, 15 Jan 2025 18:44:58 +0000 Subject: [PATCH] Build py distributions in different directory to JS distributions --- .github/workflows/release.yml | 6 ++++-- .gitignore | 1 + justfile | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2000809..92164340 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,9 +45,10 @@ jobs: token: ${{ secrets.NPM_TOKEN }} - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@v1.4.2 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: password: ${{ secrets.PYPI_API_TOKEN }} + packages-dir: py-dist/ - name: Commit updated package-lock.json and docs requirements uses: stefanzweifel/git-auto-commit-action@v4 @@ -114,9 +115,10 @@ jobs: token: ${{ secrets.NPM_TOKEN }} - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@v1.4.2 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: password: ${{ secrets.PYPI_API_TOKEN }} + packages-dir: py-dist/ - name: Commit updated package-lock.json uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.gitignore b/.gitignore index cac5d38d..35fa7d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ dash_bootstrap_components/_components/ __pycache__ *.pyc dist +py-dist *.egg-info # release artifacts diff --git a/justfile b/justfile index d5d0fdfa..3c915484 100644 --- a/justfile +++ b/justfile @@ -41,8 +41,8 @@ test-js: # Delete generated files and recreate empty directories clean: - rm -rf dist lib dash_bootstrap_components/_components - mkdir -p dist lib dash_bootstrap_components/_components + rm -rf py-dist dist lib dash_bootstrap_components/_components + mkdir -p py-dist dist lib dash_bootstrap_components/_components # Build dash-bootstrap-components build: clean && _build-py @@ -79,7 +79,7 @@ deploy-docs: _copy-examples _build-py: && _move-generated-files uv run dash-generate-components ./src/components dash_bootstrap_components cp dash_bootstrap_components/_components/dash_bootstrap_components.min.js dist - uv build --sdist --wheel + uv build --sdist --wheel -o py-dist _copy-examples: cp examples/gallery/iris-kmeans/app.py docs/examples/vendor/iris.py