@@ -7,6 +7,41 @@ permissions:
77 contents : read
88
99jobs :
10+ build-linux :
11+ environment : UnityTranslate Build
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Set up JDK 17
17+ uses : actions/setup-java@v3
18+ with :
19+ java-version : ' 17'
20+ distribution : ' temurin'
21+ - uses : actions-rust-lang/setup-rust-toolchain@v1
22+ with :
23+ rustflags : ' '
24+ # Taken from https://github.com/CaffeineMC/sodium-fabric/blob/1.19.3/dev/.github/workflows/gradle.yml
25+ - name : Cache/Uncache
26+ uses : actions/cache@v4
27+ with :
28+ path : |
29+ ~/.gradle/caches
30+ ~/.gradle/loom-cache
31+ ~/.gradle/wrapper
32+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
33+ restore-keys : |
34+ ${{ runner.os }}-gradle-
35+ - name : Build and publish artifacts
36+ run : ./gradlew publish
37+ env :
38+ MAVEN_USER : ${{ secrets.MAVEN_USER }}
39+ MAVEN_PASS : ${{ secrets.MAVEN_PASS }}
40+ - name : Upload build artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : Linux x86-64 Natives
44+ path : native/build/libs/UnityTranslateLib-*.jar
1045 build-windows :
1146 environment : UnityTranslate Build
1247 runs-on : windows-latest
2156 - uses : actions-rust-lang/setup-rust-toolchain@v1
2257 with :
2358 rustflags : ' '
24- target : ' x86_64-unknown-linux-gnu'
2559 # Taken from https://github.com/CaffeineMC/sodium-fabric/blob/1.19.3/dev/.github/workflows/gradle.yml
2660 - name : Cache/Uncache
2761 uses : actions/cache@v4
@@ -34,12 +68,12 @@ jobs:
3468 restore-keys : |
3569 ${{ runner.os }}-gradle-
3670 - name : Build and publish artifacts
37- run : ./gradlew publish
71+ run : ./gradlew :native: publish
3872 env :
3973 MAVEN_USER : ${{ secrets.MAVEN_USER }}
4074 MAVEN_PASS : ${{ secrets.MAVEN_PASS }}
4175 - name : Upload build artifacts
4276 uses : actions/upload-artifact@v4
4377 with :
44- name : Natives JAR
78+ name : Windows x86-64 Natives
4579 path : native/build/libs/UnityTranslateLib-*.jar
0 commit comments