File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ name: Maven Package
66on :
77 release :
88 types : [created]
9+ pull_request :
10+ branches :
11+ - main
912
1013jobs :
1114 build :
@@ -17,10 +20,10 @@ jobs:
1720
1821 steps :
1922 - uses : actions/checkout@v4
20- - name : Set up JDK 11
23+ - name : Set up JDK 17
2124 uses : actions/setup-java@v4
2225 with :
23- java-version : ' 11 '
26+ java-version : ' 17 '
2427 distribution : ' temurin'
2528 server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
2629 settings-path : ${{ github.workspace }} # location for the settings.xml file
2932 run : mvn -B package --file pom.xml
3033
3134 - name : Publish to GitHub Packages Apache Maven
35+ if : github.event_name == 'release'
3236 run : mvn deploy -s $GITHUB_WORKSPACE/settings.xml
3337 env :
3438 GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments