Skip to content

Commit c57c31c

Browse files
committed
github action for build
1 parent 4fb9c10 commit c57c31c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Diff for: .github/workflows/build.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Java Project
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: '21'
24+
25+
- name: List root directory (debug)
26+
run: ls -l
27+
28+
- name: Make Gradle executable
29+
run: chmod +x ./gradlew
30+
31+
- name: List project directory (debug)
32+
run: ls -l .
33+
34+
- name: Build with Gradle
35+
run: ./gradlew clean build
36+
37+
- name: List build/libs directory (debug)
38+
run: ls -l build/libs || echo "No JAR built"
39+
40+
- name: Upload JAR Artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: pdiff-jar
44+
path: build/libs/*.jar

0 commit comments

Comments
 (0)