leaves12138 commented on code in PR #11:
URL: https://github.com/apache/paimon-mosaic/pull/11#discussion_r3271474775


##########
.github/workflows/release-java.yml:
##########
@@ -0,0 +1,145 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+name: Release Java
+
+on:
+  push:
+    tags:
+      - "v[0-9]+.[0-9]+.[0-9]+"
+      - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
+  workflow_dispatch:
+
+env:
+  JDK_VERSION: 8
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  build-native:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - os: ubuntu-latest
+            target: x86_64-unknown-linux-gnu
+            os_name: linux
+            arch: x86_64
+            lib_name: libmosaic_jni.so
+          - os: ubuntu-24.04-arm
+            target: aarch64-unknown-linux-gnu
+            os_name: linux
+            arch: aarch64
+            lib_name: libmosaic_jni.so
+          - os: macos-13
+            target: x86_64-apple-darwin
+            os_name: macos
+            arch: x86_64
+            lib_name: libmosaic_jni.dylib
+          - os: macos-latest
+            target: aarch64-apple-darwin
+            os_name: macos
+            arch: aarch64
+            lib_name: libmosaic_jni.dylib
+          - os: windows-latest
+            target: x86_64-pc-windows-msvc
+            os_name: windows
+            arch: x86_64
+            lib_name: mosaic_jni.dll
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Setup Rust toolchain
+        run: |
+          rustup update stable
+          rustup default stable
+
+      - name: Build JNI library
+        run: cargo build --release -p mosaic-jni
+
+      - name: Upload native library
+        uses: actions/upload-artifact@v4
+        with:
+          name: native-${{ matrix.os_name }}-${{ matrix.arch }}
+          path: target/release/${{ matrix.lib_name }}
+
+  deploy-staging:

Review Comment:
   `deploy-staging` also runs for `workflow_dispatch` on a branch because the 
only guard is `github.repository == 'apache/paimon-mosaic'`. That can 
accidentally deploy a branch build (or fail because a SNAPSHOT build needs 
snapshot credentials while this job configures `apache.releases.https`). Please 
gate this job on tag refs as well, e.g. `github.repository == 
'apache/paimon-mosaic' && startsWith(github.ref, 'refs/tags/')`, or otherwise 
make the manual workflow require/select a release tag explicitly.



##########
.github/workflows/release-python.yml:
##########
@@ -0,0 +1,141 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Publish the mosaic-format Python package to PyPI.
+#
+# Trigger: push a version tag (e.g. v0.1.0, v0.1.0-rc1).
+# Pre-release tags (containing '-') publish to TestPyPI; release tags publish 
to PyPI.
+#
+# Token auth: add secrets PYPI_API_TOKEN / TEST_PYPI_API_TOKEN for publishing.
+
+name: Release Python
+
+on:
+  push:
+    tags:
+      - "v[0-9]+.[0-9]+.[0-9]+"
+      - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+  cancel-in-progress: true
+
+permissions:
+  contents: read
+
+jobs:
+  wheels:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - os: ubuntu-latest
+            target: x86_64-unknown-linux-gnu
+            lib_name: libmosaic_ffi.so
+          - os: ubuntu-24.04-arm
+            target: aarch64-unknown-linux-gnu
+            lib_name: libmosaic_ffi.so
+          - os: macos-13
+            target: x86_64-apple-darwin
+            lib_name: libmosaic_ffi.dylib
+          - os: macos-latest
+            target: aarch64-apple-darwin
+            lib_name: libmosaic_ffi.dylib
+          - os: windows-latest
+            target: x86_64-pc-windows-msvc
+            lib_name: mosaic_ffi.dll
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Setup Rust toolchain
+        run: |
+          rustup update stable
+          rustup default stable
+
+      - name: Build native library
+        run: cargo build --release -p mosaic-ffi
+
+      - name: Copy native library into package
+        shell: bash
+        run: cp target/release/${{ matrix.lib_name }} python/mosaic/
+
+      - name: Set up Python
+        uses: actions/setup-python@v5
+        with:
+          python-version: "3.12"
+
+      - name: Install build tools
+        run: pip install build wheel setuptools
+
+      - name: Build wheel
+        working-directory: python
+        run: python -m build --wheel
+
+      - name: Repair wheel (Linux)
+        if: runner.os == 'Linux'
+        run: |
+          pip install auditwheel patchelf
+          auditwheel repair python/dist/*.whl --wheel-dir python/dist/repaired

Review Comment:
   This still builds the Linux wheels on the host runner and only runs 
`auditwheel repair` afterwards. The repaired tag is therefore bounded by the 
runner glibc, not by a portable manylinux baseline. Locally, the same flow 
produced `py3-none-manylinux_2_34_x86_64`, and pip on a glibc 2.32 machine 
rejected it as unsupported. On `ubuntu-latest` this may be even newer. For PyPI 
release wheels, please build/repair inside a manylinux container (for example 
via `cibuildwheel`, or the same manylinux approach used by paimon-rust/maturin) 
and target a deliberate baseline such as manylinux_2_28 or manylinux2014.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to