File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Build Snapshot
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : write
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Java
18+ uses : actions/setup-java@v4
19+ with :
20+ distribution : temurin
21+ java-version : 21
22+ cache : gradle
23+
24+ - name : Setup Gradle
25+ uses : gradle/actions/setup-gradle@v4
26+
27+ - name : Build plugin
28+ run : ./gradlew clean shadowJar
29+
30+ - name : Get commit message
31+ id : commit
32+ run : |
33+ echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
34+
35+ - name : Rename jar with build number
36+ run : |
37+ JAR=$(ls build/libs/*.jar | head -n 1)
38+ NEW_NAME="ImageFrameMDE-1.0+build${{ github.run_number }}.jar"
39+ mv "$JAR" "build/libs/$NEW_NAME"
40+
41+ - name : Publish Snapshot Release
42+ uses : softprops/action-gh-release@v2
43+ with :
44+ tag_name : snapshot
45+ name : Latest Snapshot
46+ prerelease : true
47+ body : |
48+ Build: ${{ github.run_number }}
49+
50+ Commit:
51+ ${{ steps.commit.outputs.msg }}
52+
53+ Commit URL:
54+ https://github.com/${{ github.repository }}/commit/${{ github.sha }}
55+ files : build/libs/*.jar
56+ env :
57+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments