This is an automated email from the ASF dual-hosted git repository.

prantogg pushed a commit to branch prepare-for-release
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git

commit 91e10e196d9935839a4e7ceff10da0b320f070b9
Author: Pranav Toggi <[email protected]>
AuthorDate: Sun Oct 26 12:51:36 2025 -0700

    prepare for pypi and cargo release
---
 .github/workflows/build-py-packages.yml            | 105 +++++++++++++++
 .../workflows/spatialbench-cli-publish-pypi.yml    | 146 +++------------------
 .github/workflows/spatialbench-publish-crates.yml  |  33 +++++
 Cargo.toml                                         |   6 +-
 spatialbench-arrow/Cargo.toml                      |   2 +-
 spatialbench-cli/README.md                         |   2 +-
 spatialbench-cli/pyproject.toml                    |   2 +-
 spatialbench/Cargo.toml                            |   2 +-
 8 files changed, 166 insertions(+), 132 deletions(-)

diff --git a/.github/workflows/build-py-packages.yml 
b/.github/workflows/build-py-packages.yml
new file mode 100644
index 0000000..f45f26e
--- /dev/null
+++ b/.github/workflows/build-py-packages.yml
@@ -0,0 +1,105 @@
+name: Build Python Packages
+
+on:
+  workflow_call:
+    inputs:
+      upload-artifacts:
+        description: "Whether to upload built distributions as artifacts"
+        required: false
+        default: false
+        type: boolean
+
+jobs:
+  wheels:
+    runs-on: ${{ matrix.runner }}
+    strategy:
+      matrix:
+        include:
+          # Linux manylinux
+          - runner: ubuntu-22.04
+            target: x86_64
+            manylinux: auto
+            os: linux
+          - runner: ubuntu-22.04
+            target: x86
+            manylinux: auto
+            os: linux
+          - runner: ubuntu-22.04
+            target: aarch64
+            manylinux: auto
+            os: linux
+          - runner: ubuntu-22.04
+            target: armv7
+            manylinux: auto
+            os: linux
+          - runner: ubuntu-22.04
+            target: ppc64le
+            manylinux: auto
+            os: linux
+
+          # Linux musllinux
+          - runner: ubuntu-22.04
+            target: x86_64
+            manylinux: musllinux_1_2
+            os: musllinux
+          - runner: ubuntu-22.04
+            target: x86
+            manylinux: musllinux_1_2
+            os: musllinux
+          - runner: ubuntu-22.04
+            target: aarch64
+            manylinux: musllinux_1_2
+            os: musllinux
+          - runner: ubuntu-22.04
+            target: armv7
+            manylinux: musllinux_1_2
+            os: musllinux
+
+          # Windows
+          - runner: windows-latest
+            target: x64
+            os: windows
+          - runner: windows-latest
+            target: x86
+            os: windows
+
+          # macOS
+          - runner: macos-13
+            target: x86_64
+            os: macos
+          - runner: macos-14
+            target: aarch64
+            os: macos
+
+    steps:
+      - uses: actions/checkout@v4
+      - name: Build wheels
+        uses: PyO3/maturin-action@v1
+        with:
+          target: ${{ matrix.target }}
+          args: --release --out dist
+          working-directory: spatialbench-cli
+          manylinux: ${{ matrix.manylinux || '' }}
+      - name: Upload wheels
+        if: ${{ inputs.upload-artifacts }}
+        uses: actions/upload-artifact@v4
+        with:
+          name: wheels-${{ matrix.os }}-${{ matrix.target }}
+          path: spatialbench-cli/dist
+
+  sdist:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Build sdist
+        uses: PyO3/maturin-action@v1
+        with:
+          command: sdist
+          args: --out dist
+          working-directory: spatialbench-cli
+      - name: Upload sdist
+        if: ${{ inputs.upload-artifacts }}
+        uses: actions/upload-artifact@v4
+        with:
+          name: wheels-sdist
+          path: spatialbench-cli/dist
\ No newline at end of file
diff --git a/.github/workflows/spatialbench-cli-publish-pypi.yml 
b/.github/workflows/spatialbench-cli-publish-pypi.yml
index c95126e..679da96 100644
--- a/.github/workflows/spatialbench-cli-publish-pypi.yml
+++ b/.github/workflows/spatialbench-cli-publish-pypi.yml
@@ -9,144 +9,40 @@ permissions:
   contents: read
 
 jobs:
-  linux:
-    runs-on: ${{ matrix.platform.runner }}
-    strategy:
-      matrix:
-        platform:
-          - runner: ubuntu-22.04
-            target: x86_64
-          - runner: ubuntu-22.04
-            target: x86
-          - runner: ubuntu-22.04
-            target: aarch64
-          - runner: ubuntu-22.04
-            target: armv7
-          - runner: ubuntu-22.04
-            target: s390x
-          - runner: ubuntu-22.04
-            target: ppc64le
-    steps:
-      - uses: actions/checkout@v4
-      - name: Build wheels
-        uses: PyO3/maturin-action@v1
-        with:
-          target: ${{ matrix.platform.target }}
-          args: --release --out dist
-          working-directory: spatialbench-cli
-          manylinux: auto
-      - name: Upload wheels
-        uses: actions/upload-artifact@v4
-        with:
-          name: wheels-linux-${{ matrix.platform.target }}
-          path: spatialbench-cli/dist
-
-  musllinux:
-    runs-on: ${{ matrix.platform.runner }}
-    strategy:
-      matrix:
-        platform:
-          - runner: ubuntu-22.04
-            target: x86_64
-          - runner: ubuntu-22.04
-            target: x86
-          - runner: ubuntu-22.04
-            target: aarch64
-          - runner: ubuntu-22.04
-            target: armv7
-    steps:
-      - uses: actions/checkout@v4
-      - name: Build wheels
-        uses: PyO3/maturin-action@v1
-        with:
-          target: ${{ matrix.platform.target }}
-          args: --release --out dist
-          working-directory: spatialbench-cli
-          manylinux: musllinux_1_2
-      - name: Upload wheels
-        uses: actions/upload-artifact@v4
-        with:
-          name: wheels-musllinux-${{ matrix.platform.target }}
-          path: spatialbench-cli/dist
-
-  windows:
-    runs-on: ${{ matrix.platform.runner }}
-    strategy:
-      matrix:
-        platform:
-          - runner: windows-latest
-            target: x64
-          - runner: windows-latest
-            target: x86
-    steps:
-      - uses: actions/checkout@v4
-      - name: Build wheels
-        uses: PyO3/maturin-action@v1
-        with:
-          target: ${{ matrix.platform.target }}
-          args: --release --out dist
-          working-directory: spatialbench-cli
-      - name: Upload wheels
-        uses: actions/upload-artifact@v4
-        with:
-          name: wheels-windows-${{ matrix.platform.target }}
-          path: spatialbench-cli/dist
-
-  macos:
-    runs-on: ${{ matrix.platform.runner }}
-    strategy:
-      matrix:
-        platform:
-          - runner: macos-13
-            target: x86_64
-          - runner: macos-14
-            target: aarch64
-    steps:
-      - uses: actions/checkout@v4
-      - name: Build wheels
-        uses: PyO3/maturin-action@v1
-        with:
-          target: ${{ matrix.platform.target }}
-          args: --release --out dist
-          working-directory: spatialbench-cli
-      - name: Upload wheels
-        uses: actions/upload-artifact@v4
-        with:
-          name: wheels-macos-${{ matrix.platform.target }}
-          path: spatialbench-cli/dist
-
-  sdist:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-      - name: Build sdist
-        uses: PyO3/maturin-action@v1
-        with:
-          command: sdist
-          args: --out dist
-          working-directory: spatialbench-cli
-      - name: Upload sdist
-        uses: actions/upload-artifact@v4
-        with:
-          name: wheels-sdist
-          path: spatialbench-cli/dist
+  build:
+    uses: ./.github/workflows/build-py-packages.yml
+    with:
+      upload-artifacts: true
 
   release:
     name: Release
     runs-on: ubuntu-latest
     environment: pypi
-    needs: [linux, musllinux, windows, macos, sdist]
+    needs: [build]
     permissions:
       id-token: write # Use to sign the release artifacts and for pypi trusted 
publishing
       attestations: write # Used to generate artifact attestation
     steps:
-      - uses: actions/download-artifact@v4
+      - name: Download all build artifacts
+        uses: actions/download-artifact@v4
+        with:
+          pattern: '*'
+          merge-multiple: true
+          path: dist
+
+      - name: Install twine
+        run: python -m pip install --upgrade twine
+
+      - name: Check distributions
+        run: python -m twine check --strict dist/*
+
       - name: Generate artifact attestation
         uses: actions/attest-build-provenance@v2
         with:
-          subject-path: 'wheels-*/*'
+          subject-path: 'dist/*'
+
       - name: Publish to PyPI
         uses: PyO3/maturin-action@v1
         with:
           command: upload
-          args: --non-interactive --skip-existing wheels-*/*
+          args: --non-interactive --skip-existing dist/*
\ No newline at end of file
diff --git a/.github/workflows/spatialbench-publish-crates.yml 
b/.github/workflows/spatialbench-publish-crates.yml
new file mode 100644
index 0000000..fe9221e
--- /dev/null
+++ b/.github/workflows/spatialbench-publish-crates.yml
@@ -0,0 +1,33 @@
+name: spatialbench-publish-crates.yml
+
+on:
+  release:
+    types: [created]
+  workflow_dispatch:
+
+jobs:
+  publish:
+    runs-on: ubuntu-latest
+    environment: release
+    permissions:
+      id-token: write     # Required for OIDC token exchange
+    strategy:
+      # Publish package one by one instead of flooding the registry
+      max-parallel: 1
+      matrix:
+        # Order here is sensitive, as it will be used to determine the order 
of publishing
+        package:
+          - "spatialbench"
+          - "spatialbench-arrow"
+          - "spatialbench-cli"
+    steps:
+      - uses: actions/checkout@v5
+
+      - uses: rust-lang/crates-io-auth-action@v1
+        id: auth
+
+      - name: Publish ${{ matrix.package }}
+        working-directory: ${{ matrix.package }}
+        run: cargo publish
+        env:
+          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
\ No newline at end of file
diff --git a/Cargo.toml b/Cargo.toml
index 19cbd9a..0d419ef 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,12 +5,12 @@ members = ["spatialbench", "spatialbench-arrow", 
"spatialbench-cli"]
 resolver = "2"
 
 [workspace.package]
-authors = ["clflushopt", "alamb"]
+authors = ["Apache Sedona <[email protected]>"]
 edition = "2021"
-homepage = "https://github.com/wherobots/sedona-spatialbench";
+homepage = "https://github.com/apache/sedona-spatialbench/";
 license = "Apache-2.0"
 readme = "README.md"
-repository = "https://github.com/wherobots/sedona-spatialbench";
+repository = "https://github.com/apache/sedona-spatialbench/";
 version = "1.1.1"
 
 [workspace.dependencies]
diff --git a/spatialbench-arrow/Cargo.toml b/spatialbench-arrow/Cargo.toml
index 5a6a686..8b08564 100644
--- a/spatialbench-arrow/Cargo.toml
+++ b/spatialbench-arrow/Cargo.toml
@@ -4,7 +4,7 @@ version = "1.1.1"
 edition = "2024"
 authors = ["clflushopt", "alamb"]
 description = "TPC-H data generator into Apache Arrow format"
-repository = "https://github.com/wherobots/sedona-spatialbench";
+repository = "https://github.com/apache/sedona-spatialbench";
 readme = "README.md"
 license = "Apache-2.0"
 
diff --git a/spatialbench-cli/README.md b/spatialbench-cli/README.md
index 84f8cca..416a355 100644
--- a/spatialbench-cli/README.md
+++ b/spatialbench-cli/README.md
@@ -1,6 +1,6 @@
 # SpatialBench Data Generator CLI
 
-See the main [README.md](https://github.com/wherobots/sedona-spatialbench) for 
full documentation.
+See the main [README.md](https://github.com/apache/sedona-spatialbench) for 
full documentation.
 
 ## Installation
 
diff --git a/spatialbench-cli/pyproject.toml b/spatialbench-cli/pyproject.toml
index 2edba14..54b7366 100644
--- a/spatialbench-cli/pyproject.toml
+++ b/spatialbench-cli/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "maturin"
 
 [project]
 name = "spatialbench-cli"
-dynamic = ["version"]
+dynamic = ["version", "readme", "license", "authors"]
 description = "Python CLI for Spatial Bench data generator"
 requires-python = ">=3.8"
 
diff --git a/spatialbench/Cargo.toml b/spatialbench/Cargo.toml
index a3c123c..26c60d1 100644
--- a/spatialbench/Cargo.toml
+++ b/spatialbench/Cargo.toml
@@ -2,7 +2,7 @@
 name = "spatialbench"
 authors = ["clflushopt", "alamb"]
 description = "Blazing fast pure Rust no dependency TPC-H data generation 
library."
-repository = "https://github.com/wherobots/sedona-spatialbench";
+repository = "https://github.com/apache/sedona-spatialbench";
 readme = { workspace = true }
 version = { workspace = true }
 edition = { workspace = true }

Reply via email to