diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index a5972c8..8c4a596 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -59,7 +59,7 @@ jobs: - name: Build distributions working-directory: python run: | - uv build --sdist --wheel --out-dir dist + maturin build --release --out dist --sdist - name: Upload distributions uses: actions/upload-artifact@v4 diff --git a/.github/workflows/rust-publish.yml b/.github/workflows/rust-publish.yml index b897835..cb7e814 100644 --- a/.github/workflows/rust-publish.yml +++ b/.github/workflows/rust-publish.yml @@ -27,6 +27,7 @@ env: jobs: publish: + if: github.event_name != 'pull_request' runs-on: ubuntu-24.04 timeout-minutes: 60 steps: @@ -46,9 +47,25 @@ jobs: - uses: rui314/setup-mold@v1 - - uses: katyo/publish-crates@v2 + - name: Publish lance-context-core + uses: katyo/publish-crates@v2 with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - args: "-p lance-context-core -p lance-context --all-features" - path: . + args: "--all-features" + path: crates/lance-context-core + dry-run: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run') }} + + - name: Wait for crates.io index + if: > + (github.event_name == 'release' && github.event.action == 'released') || + (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'release') + run: | + sleep 30 + + - name: Publish lance-context + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + args: "--all-features" + path: crates/lance-context dry-run: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run') }}