Skip to content

Cut new release 3.3.1 (#1281) #69

Cut new release 3.3.1 (#1281)

Cut new release 3.3.1 (#1281) #69

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v4
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
with:
java-version: 11
server-id: central
distribution: "adopt"
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
# Step 1: Build and install dependencies to local Maven repository
# This builds jdbc-core (and parent) without publishing them.
# The -am flag builds all dependencies needed by assembly-uber.
# We use -Prelease here to generate sources/javadoc JARs for jdbc-core,
# which assembly-uber copies for its own sources/javadoc artifacts.
# GPG signing is skipped since we're only installing locally, not publishing.
- name: Build dependencies
run: |
mvn -Prelease clean install --batch-mode -pl jdbc-core -am -Dgpg.skip=true
# Step 2: Deploy only the uber JAR module to Maven Central
# We don't use -am here to avoid the central-publishing-maven-plugin
# from collecting parent/jdbc-core artifacts into the deployment bundle.
# The jdbc-core dependency is already available from Step 1.
- name: Publish uber JAR to Maven Central
run: |
mvn -Prelease deploy --batch-mode -pl assembly-uber \
-Dnvd.api.key=${{ secrets.NVD_API_KEY }} \
-Dossindex.username=${{ secrets.OSSINDEX_USERNAME }} \
-Dossindex.password=${{ secrets.OSSINDEX_PASSWORD }}
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: |
assembly-uber/target/databricks-jdbc-*.jar