File tree 2 files changed +17
-9
lines changed
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
2
3
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 }}
9
9
10
10
jobs :
11
11
build :
@@ -18,11 +18,15 @@ jobs:
18
18
with :
19
19
java-version : ' 21'
20
20
distribution : ' temurin'
21
+ server-id : github
21
22
- name : Build with Maven
22
23
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/')
23
27
- name : Publish to GitHub Packages
24
28
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
26
30
env :
27
31
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
32
Original file line number Diff line number Diff line change 191
191
</dependencies >
192
192
193
193
<distributionManagement >
194
-
194
+ <repository >
195
+ <id >github</id >
196
+ <name >GitHub GraphHopper Apache Maven Packages</name >
197
+ <url >https://maven.pkg.github.com/graphhopper/jsprit</url >
198
+ </repository >
195
199
</distributionManagement >
196
200
197
201
<!-- mvn clean deploy -P release -->
You can’t perform that action at this time.
0 commit comments