From 47fa3ab7df8026da8e4e22efb1c3707efacfc9df Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 5 Nov 2024 05:45:47 +0100 Subject: [PATCH] Fix CI/CD for pip release --- .github/workflows/node-hub-ci-cd.yml | 12 ++++++++++++ .github/workflows/pip-release.yml | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-hub-ci-cd.yml b/.github/workflows/node-hub-ci-cd.yml index 2fa1027c6..a8326a864 100644 --- a/.github/workflows/node-hub-ci-cd.yml +++ b/.github/workflows/node-hub-ci-cd.yml @@ -102,7 +102,19 @@ jobs: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PASS }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: | + # List of ignored modules + ignored_folders=("dora-parler") + for dir in node-hub/*/ ; do + + # Get the base name of the directory (without the path) + base_dir=$(basename "$dir") + + if [[ " ${ignored_folders[@]} " =~ " ${base_dir} " ]]; then + echo "Skipping $base_dir as there is a hf model fetching issue..." + continue + fi + if [ -d "$dir" ]; then if [[ -f "$dir/Cargo.toml" && -f "$dir/pyproject.toml" ]]; then echo "Publishing $dir using maturin..." diff --git a/.github/workflows/pip-release.yml b/.github/workflows/pip-release.yml index a1d85b8ce..e8bea26e4 100644 --- a/.github/workflows/pip-release.yml +++ b/.github/workflows/pip-release.yml @@ -238,6 +238,13 @@ jobs: runs-on: ubuntu-22.04 if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') needs: [linux, musllinux, musleabi, windows, macos, sdist] + strategy: + matrix: + repository: + - path: apis/python/node + name: dora-node-api + - path: binaries/cli + name: dora-rs-cli steps: - uses: actions/download-artifact@v4 - name: Publish to PyPI @@ -246,4 +253,4 @@ jobs: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_PASS }} with: command: upload - args: --non-interactive --skip-existing wheels-*/* + args: --non-interactive --skip-existing ${{ matrix.repository.name }}-*/*