This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-mosaic.git
The following commit(s) were added to refs/heads/main by this push:
new 741d3f2 Add Java snapshot publishing workflow and deploy settings
(#13)
741d3f2 is described below
commit 741d3f2e92207d8ccc4e599691c3f7308b05f114
Author: Jingsong Lee <[email protected]>
AuthorDate: Wed May 20 13:09:11 2026 +0800
Add Java snapshot publishing workflow and deploy settings (#13)
---
.github/workflows/ci.yml | 4 +-
.github/workflows/publish_snapshot.yml | 94 ++++++++++++++++++++++++++++++++++
deploysettings.xml | 37 +++++++++++++
3 files changed, 133 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 70be68d..c389704 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -119,10 +119,10 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
- - name: Set up JDK 11
+ - name: Set up JDK 8
uses: actions/setup-java@v4
with:
- java-version: '11'
+ java-version: '8'
distribution: 'temurin'
- name: Build JNI library
diff --git a/.github/workflows/publish_snapshot.yml
b/.github/workflows/publish_snapshot.yml
new file mode 100644
index 0000000..947fdc1
--- /dev/null
+++ b/.github/workflows/publish_snapshot.yml
@@ -0,0 +1,94 @@
+################################################################################
+# 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: Publish Snapshot
+
+on:
+ push:
+ branches: [main]
+
+env:
+ JDK_VERSION: 8
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ publish-snapshot:
+ if: github.repository == 'apache/paimon-mosaic'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup Rust toolchain
+ run: |
+ rustup update stable
+ rustup default stable
+
+ - name: Cache Rust dependencies
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
+
+ - name: Build JNI library
+ run: cargo build --release -p mosaic-jni
+
+ - name: Prepare native resources
+ run: |
+ RESOURCE_DIR=java/src/main/resources/native/linux/x86_64
+ mkdir -p "$RESOURCE_DIR"
+ cp target/release/libmosaic_jni.so "$RESOURCE_DIR/"
+
+ - name: Set up JDK ${{ env.JDK_VERSION }}
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ env.JDK_VERSION }}
+ distribution: 'temurin'
+
+ - name: Cache local Maven repository
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: snapshot-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ snapshot-maven-
+
+ - name: Publish snapshot
+ env:
+ ASF_USERNAME: ${{ secrets.NEXUS_USER }}
+ ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
+ MAVEN_OPTS: -Xmx4096m
+ working-directory: java
+ run: |
+ tmp_settings="tmp-settings.xml"
+ echo "<settings><servers><server>" > $tmp_settings
+ echo
"<id>apache.snapshots.https</id><username>$ASF_USERNAME</username>" >>
$tmp_settings
+ echo "<password>$ASF_PASSWORD</password>" >> $tmp_settings
+ echo "</server></servers></settings>" >> $tmp_settings
+
+ mvn --settings $tmp_settings clean deploy -Dgpg.skip -Drat.skip
-DskipTests
+
+ rm $tmp_settings
diff --git a/deploysettings.xml b/deploysettings.xml
new file mode 100644
index 0000000..6026958
--- /dev/null
+++ b/deploysettings.xml
@@ -0,0 +1,37 @@
+<!--
+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.
+
+-->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
+ http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <servers>
+ <server>
+ <id>apache.snapshots.https</id>
+ <username>${sonatype_user}</username>
+ <password>${sonatype_pw}</password>
+ </server>
+ <server>
+ <id>apache.releases.https</id>
+ <username>${sonatype_user}</username>
+ <password>${sonatype_pw}</password>
+ </server>
+ </servers>
+</settings>