Release @bitwarden/sdk-napi workflow - Fix logic #1387
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: Build Java SDK | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
generate_schemas: | |
uses: ./.github/workflows/generate_schemas.yml | |
build_rust: | |
uses: ./.github/workflows/build-rust-cross-platform.yml | |
build_java: | |
name: Build Java | |
runs-on: ubuntu-22.04 | |
needs: | |
- generate_schemas | |
- build_rust | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Download Java schemas artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: sdk-schemas-java | |
path: languages/java/src/main/java/bit/sdk/schema/ | |
- name: Setup Java | |
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Download x86_64-apple-darwin files | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: libbitwarden_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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: libbitwarden_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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: libbitwarden_c_files-x86_64-unknown-linux-gnu | |
path: languages/java/src/main/resources/linux-x86-64 | |
- name: Download x86_64-pc-windows-msvc files | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: libbitwarden_c_files-x86_64-pc-windows-msvc | |
path: languages/java/src/main/resources/win32-x86-64 | |
- name: Build Maven | |
run: ./gradlew build | |
working-directory: languages/java | |
- name: Upload Java SDK Build | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: build | |
path: ${{ github.workspace }}/languages/java/build | |
if-no-files-found: error | |
- name: Upload Java SDK Build | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: resources | |
path: ${{ github.workspace }}/languages/java/src/main/resources | |
if-no-files-found: error | |
- name: Upload Java SDK Build | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: schemas | |
path: languages/java/src/main/java/bit/sdk/schema | |
if-no-files-found: error |