-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (59 loc) · 1.99 KB
/
release-java.yml
File metadata and controls
69 lines (59 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build Java
run-name: "Build Java SDK ${{ github.ref_name }}"
on:
workflow_dispatch:
inputs:
jni-run-id:
description: "Run ID of the release-jni.yml build containing JNI artifacts."
required: true
type: string
jobs:
build-jar:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Get JFrog OIDC token
shell: bash
run: bash "$GITHUB_WORKSPACE/.github/scripts/jfrog-oidc-token.sh"
- name: Download JNI artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
gh run download "${{ inputs.jni-run-id }}" \
--repo databricks/zerobus-sdk \
--pattern 'jni-*' \
--dir jni-artifacts/
echo "Downloaded JNI artifacts:"
find jni-artifacts/ -type f | sort
- name: Place JNI libraries in native directory
working-directory: java
run: |
for dir in ../jni-artifacts/jni-*/; do
platform=$(basename "$dir" | sed 's/jni-//')
mkdir -p src/main/resources/native/"$platform"
cp "$dir"/* src/main/resources/native/"$platform"/
done
- name: Set up Java
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
java-version: 11
distribution: temurin
- name: Configure Maven registry
shell: bash
run: bash "$GITHUB_WORKSPACE/.github/scripts/configure-maven.sh"
- name: Build JAR
working-directory: java
run: mvn -DskipTests=true --batch-mode package
- name: Upload JAR
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: java-jar
path: |
java/target/*.jar
java/target/*.pom
if-no-files-found: error