-
Notifications
You must be signed in to change notification settings - Fork 50
87 lines (72 loc) · 2.86 KB
/
build-java.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- 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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build
path: ${{ github.workspace }}/languages/java/build
if-no-files-found: error
- name: Upload Java SDK Build
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas
path: languages/java/src/main/java/bit/sdk/schema
if-no-files-found: error