Skip to content

Commit 7e03e76

Browse files
committed
Enable Maven snapshots publishing (1.5)
Ref: #546
1 parent 8ec2e6b commit 7e03e76

2 files changed

Lines changed: 405 additions & 0 deletions

File tree

.github/workflows/Java.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,83 @@ jobs:
824824
path: |
825825
jdbc-artifacts
826826
827+
# Publish SNAPSHOT builds to Maven Central Snapshots repository on main branch
828+
# SNAPSHOTs don't require GPG signatures or validation
829+
# See: https://central.sonatype.org/publish/publish-portal-snapshots/
830+
maven-snapshot-deploy:
831+
if: ${{ github.repository == 'duckdb/duckdb-java' && github.ref == 'refs/heads/v1.5-variegata' && github.event_name == 'push' }}
832+
name: Maven SNAPSHOT Deploy
833+
runs-on: ubuntu-latest
834+
timeout-minutes: 30
835+
needs:
836+
- java-linux-amd64
837+
- java-linux-amd64-tck
838+
- java-linux-amd64-spark
839+
- java-linux-amd64-asan
840+
- java-linux-aarch64
841+
- java-linux-amd64-musl
842+
- java-linux-aarch64-musl
843+
- java-windows-amd64
844+
- java-windows-aarch64
845+
- java-osx-universal
846+
847+
steps:
848+
- uses: actions/checkout@v4
849+
with:
850+
fetch-depth: 0
851+
852+
- name: Set up JDK
853+
uses: actions/setup-java@v4
854+
with:
855+
java-version: '11'
856+
distribution: 'temurin'
857+
858+
- shell: bash
859+
run: mkdir jdbc-artifacts
860+
861+
- uses: actions/download-artifact@v4
862+
with:
863+
name: java-linux-amd64
864+
path: jdbc-artifacts/java-linux-amd64
865+
866+
- uses: actions/download-artifact@v4
867+
with:
868+
name: java-linux-aarch64
869+
path: jdbc-artifacts/java-linux-aarch64
870+
871+
- uses: actions/download-artifact@v4
872+
with:
873+
name: java-linux-amd64-musl
874+
path: jdbc-artifacts/java-linux-amd64-musl
875+
876+
- uses: actions/download-artifact@v4
877+
with:
878+
name: java-linux-aarch64-musl
879+
path: jdbc-artifacts/java-linux-aarch64-musl
880+
881+
- uses: actions/download-artifact@v4
882+
with:
883+
name: java-windows-amd64
884+
path: jdbc-artifacts/java-windows-amd64
885+
886+
- uses: actions/download-artifact@v4
887+
with:
888+
name: java-windows-aarch64
889+
path: jdbc-artifacts/java-windows-aarch64
890+
891+
- uses: actions/download-artifact@v4
892+
with:
893+
name: java-osx-universal
894+
path: jdbc-artifacts/java-osx-universal
895+
896+
- name: Deploy SNAPSHOT to Maven Central
897+
shell: bash
898+
env:
899+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
900+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
901+
run: |
902+
python ./scripts/jdbc_maven_deploy_snapshot.py jdbc-artifacts .
903+
827904
java-merge-vendoring-pr:
828905
name: Merge vendoring PR
829906
if: ${{ github.repository == 'duckdb/duckdb-java' && github.event_name == 'pull_request' && github.head_ref == format('vendoring-{0}', github.base_ref) }}

0 commit comments

Comments
 (0)