-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (43 loc) · 1.2 KB
/
java.yml
File metadata and controls
46 lines (43 loc) · 1.2 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
name: build Java wrapper
on:
workflow_dispatch:
push:
paths:
- src/**
- include/**
- mman-win32/**
- platforms/java/**
- .github/workflows/java.yml
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Get latest commit hash
run: echo "LATEST_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
server-id: hytalemodding.dev
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Setup zig
uses: mlugg/setup-zig@v2
with:
version: 0.14.1
- name: Build and publish
run: |
mkdir -p release
cd platforms/java
./gradlew publish --stacktrace
cp $(find ./build/libs -maxdepth 1 -type f -name "*.jar") ../../release/
- uses: actions/upload-artifact@v6
with:
name: libdtc-java
path: ./release/