Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 5 additions & 46 deletions .github/workflows/release-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ name: Release Build Check

on:
push:
# Run a release build dry-run on pushes to any branch to verify
# that the release build still succeeds. Actual releases are driven
# by the secure release pipeline in
# databricks/secure-public-registry-releases-eng via workflow_dispatch
# against tagging.yml and package.yml.
branches:
- "**"

permissions:
id-token: write
contents: read

jobs:
Expand All @@ -26,30 +20,13 @@ jobs:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0

- name: Cache Maven packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Setup JFrog CLI with OIDC
id: jfrog
uses: jfrog/setup-jfrog-cli@279b1f629f43dd5bc658d8361ac4802a7ef8d2d5 # v4.9.1
env:
JF_URL: https://databricks.jfrog.io
with:
oidc-provider-name: github-actions

- name: Set up Java for publishing to Maven Central Repository
- name: Set up Java
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
java-version: 8
distribution: "adopt"
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Configure Maven for JFrog and Maven Central
- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << EOF
Expand All @@ -63,28 +40,10 @@ jobs:
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<id>jfrog-maven</id>
<username>${{ steps.jfrog.outputs.oidc-user }}</username>
<password><![CDATA[${{ steps.jfrog.outputs.oidc-token }}]]></password>
</server>
<server>
<id>central</id>
<username>${{ secrets.MAVEN_CENTRAL_USERNAME }}</username>
<password>${{ secrets.MAVEN_CENTRAL_PASSWORD }}</password>
</server>
<server>
<id>gpg.passphrase</id>
<passphrase>\${env.GPG_PASSPHRASE}</passphrase>
</server>
</servers>
</settings>
EOF

- name: Run Release Dry-Run (Verify)
run: mvn -Prelease -DskipTests=true --batch-mode verify
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
run: |
local_repo=$(mktemp -d "$RUNNER_TEMP/maven-repository.XXXXXX")
mvn -Dmaven.repo.local="$local_repo" -DskipTests=true --batch-mode verify
Loading