Release Java SDK #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Java SDK | |
run-name: Release Java SDK | |
on: | |
push: | |
tags: | |
- "*.*.*" # version, e.g. 1.0.0 | |
jobs: | |
generate_schemas: | |
uses: ./.github/workflows/generate-schemas.yml | |
build_rust: | |
uses: ./.github/workflows/build-c-bindings.yml | |
test-rust-crate: | |
uses: ./.github/workflows/rust-test.yml | |
secrets: | |
INFISICAL_UNIVERSAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_SECRET }} | |
INFISICAL_UNIVERSAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_ID }} | |
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_PROJECT_ID }} | |
INFISICAL_SITE_URL: ${{ secrets.INFISICAL_SITE_URL }} | |
build_java: | |
name: Build Java | |
runs-on: ubuntu-22.04 | |
needs: | |
- generate_schemas | |
- build_rust | |
- test-rust-crate | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Download Java schemas artifact | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: sdk-schemas-java | |
path: languages/java/src/main/java/infisical/sdk/schema/ | |
- name: Setup Java | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Download x86_64-apple-darwin files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-x86_64-apple-darwin | |
path: languages/java/src/main/resources/darwin-x86-64 | |
- name: Download aarch64-apple-darwin files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-aarch64-apple-darwin | |
path: languages/java/src/main/resources/darwin-aarch64 | |
- name: Download x86_64-unknown-linux-gnu files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-x86_64-unknown-linux-gnu | |
path: languages/java/src/main/resources/linux-x86-64 | |
- name: Download aarch64-unknown-linux-gnu files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-aarch64-unknown-linux-gnu | |
path: languages/java/src/main/resources/linux-aarch64-gnu | |
- name: Download aarch64-unknown-linux-musl files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-aarch64-unknown-linux-musl | |
path: languages/java/src/main/resources/linux-aarch64-musl | |
- name: Download x86_64-pc-windows-msvc files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libinfisical_c_files-x86_64-pc-windows-msvc | |
path: languages/java/src/main/resources/win32-x86-64 | |
- name: Organize and rename Linux ARM64 libraries | |
run: | | |
mkdir -p languages/java/src/main/resources/linux-aarch64 | |
mv languages/java/src/main/resources/linux-aarch64-gnu/libinfisical_c.so languages/java/src/main/resources/linux-aarch64/libinfisical_c_gnu.so | |
mv languages/java/src/main/resources/linux-aarch64-musl/libinfisical_c.so languages/java/src/main/resources/linux-aarch64/libinfisical_c_musl.so | |
rm -rf languages/java/src/main/resources/linux-aarch64-musl | |
rm -rf languages/java/src/main/resources/linux-aarch64-gnu | |
- name: List files in resources folders | |
run: | | |
echo "Listing files in languages/java/src/main/resources:" | |
ls -R languages/java/src/main/resources | |
- name: Publish Maven | |
working-directory: languages/java | |
run: | | |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }} # Last 8 characters of the full key ID | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }} |