File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1- name : GitHub CI
1+ name : Build and test
2+ on : push
23
3- on :
4- push :
5- branches :
6- - master
7- tags :
8- - ' *'
4+ env :
5+ # we use these in .ci.maven.settings.xml, which is needed to authenticate for core (!) GitHub packages
6+ MAVEN_SETTINGS_USERNAME_FOR_GITHUB : ${{ secrets.MAVEN_SETTINGS_USERNAME_FOR_GITHUB }}
7+ MAVEN_SETTINGS_PASSWORD_FOR_GITHUB : ${{ secrets.MAVEN_SETTINGS_PASSWORD_FOR_GITHUB }}
8+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
99
1010jobs :
1111 build :
@@ -18,11 +18,15 @@ jobs:
1818 with :
1919 java-version : ' 21'
2020 distribution : ' temurin'
21+ server-id : github
2122 - name : Build with Maven
2223 run : mvn --batch-mode --update-snapshots verify
24+ - name : Set jsprit version (tagged only)
25+ run : mvn versions:set -DnewVersion=${{ github.ref_name }} -DgenerateBackupPoms=false --no-transfer-progress
26+ if : startsWith(github.ref, 'refs/tags/')
2327 - name : Publish to GitHub Packages
2428 if : startsWith(github.ref, 'refs/tags/')
25- run : mvn --batch-mode deploy
29+ run : mvn --batch-mode deploy -B --no-transfer-progress -DskipTests -P release
2630 env :
2731 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2832
Original file line number Diff line number Diff line change 186186 </dependencies >
187187
188188 <distributionManagement >
189-
189+ <repository >
190+ <id >github</id >
191+ <name >GitHub GraphHopper Apache Maven Packages</name >
192+ <url >https://maven.pkg.github.com/graphhopper/jsprit</url >
193+ </repository >
190194 </distributionManagement >
191195
192196 <!-- mvn clean deploy -P release -->
You can’t perform that action at this time.
0 commit comments