File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments