Skip to content

Commit 48dc141

Browse files
committed
..
1 parent 761ddc1 commit 48dc141

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
jobs:
2+
build:
3+
steps:
4+
- name: Checkout repository
5+
uses: actions/checkout@v4
6+
7+
- name: Set up JDK 21
8+
uses: actions/setup-java@v4
9+
with:
10+
java-version: '21'
11+
distribution: 'temurin'
12+
cache: 'gradle'
13+
14+
- name: Grant execute permission to gradlew
15+
run: chmod +x gradlew
16+
17+
- name: Build with Gradle
18+
run: ./gradlew build --no-daemon
19+
20+
- name: Find the primary build artifact (JAR/WAR)
21+
id: find_artifact
22+
run: |
23+
ARTIFACT_PATH=$(find build/libs/ -type f -name "*.jar" -o -name "*.war" | head -n 1)
24+
echo "artifact_path=$ARTIFACT_PATH" >> $GITHUB_OUTPUT
25+
26+
- name: Upload artifact to GitHub Release
27+
if: steps.find_artifact.outputs.artifact_path != ''
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
files: ${{ steps.find_artifact.outputs.artifact_path }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)