Skip to content

Commit 0740425

Browse files
authored
Update publish.yml (#43)
2 parents 497b84c + cc2192f commit 0740425

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,35 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
24+
2425
- name: Setup JDK
2526
uses: actions/setup-java@v4
2627
with:
2728
distribution: 'graalvm'
2829
java-version: '21'
29-
- name: Build with Gradle
30+
31+
- name: Build all modules with Gradle
3032
run: ./gradlew shadowJar
31-
- name: Publish to Maven
32-
run: ./gradlew publish
33+
34+
- name: Publish all modules to Maven
35+
run: ./gradlew publish
36+
37+
- name: Extract Project Version
38+
id: get_version
39+
run: echo "VERSION=$(./gradlew properties | grep "^version:" | awk '{print $2}')" >> $GITHUB_ENV
40+
41+
- name: Find all JAR files
42+
id: find_jars
43+
run: |
44+
echo "JAR_FILES=$(find . -path "*/build/libs/*.jar" | tr '\n' ' ')" >> $GITHUB_ENV
45+
46+
- name: Create GitHub Release
47+
uses: softprops/action-gh-release@v2
48+
with:
49+
tag_name: v${{ env.VERSION }}
50+
name: Release ${{ env.VERSION }}
51+
draft: false
52+
prerelease: false
53+
files: ${{ env.JAR_FILES }}
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)