Skip to content

Commit 1f67b0a

Browse files
committed
Merge branch 'master' into HEAD
2 parents f4ffdf2 + e7d3919 commit 1f67b0a

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/build.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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

1010
jobs:
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

pom.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@
191191
</dependencies>
192192

193193
<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>
195199
</distributionManagement>
196200

197201
<!-- mvn clean deploy -P release -->

0 commit comments

Comments
 (0)