File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 8
8
name : Publish Packages to GitHub Packages with Gradle
9
9
10
10
on :
11
- push :
12
- branches :
13
- - main
11
+ release :
12
+ types :
13
+ - published
14
14
15
15
jobs :
16
16
build :
@@ -51,19 +51,17 @@ jobs:
51
51
- name : Set up JDK 17
52
52
uses : actions/setup-java@v4
53
53
with :
54
- java-version : ' 17'
55
- distribution : ' corretto'
56
- server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
57
- settings-path : ${{ github.workspace }} # location for the settings.xml file
54
+ java-version : " 17"
55
+ distribution : " corretto"
58
56
59
57
- name : Setup Gradle
60
- uses : gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
58
+ uses : gradle/actions/setup-gradle@v4
61
59
62
60
- name : Grant Execution Authority to Gradlew
63
61
run : chmod +x ./gradlew
64
62
65
63
- name : Build with Gradle
66
- run : ./gradlew build
64
+ run : ./gradlew build -PartefactVersion=${{ github.event.release.tag_name }} # Overwrite artefactVersion
67
65
68
66
- name : Publish to Maven Central
69
67
run : ./gradlew publish
You can’t perform that action at this time.
0 commit comments