2727 paths :
2828 - ' src/**'
2929 - ' pom.xml'
30+ - ' .github/workflows/merge-build.yml'
3031
3132jobs :
3233 publish-snapshot :
@@ -47,19 +48,24 @@ jobs:
4748 architecture : x64
4849 java-version : 17
4950
50- - name : maven-settings-xml-action
51- uses : whelk-io/maven-settings-xml-action@v22
52- if : ${{ github.event.repository.fork == false }}
51+ - uses : s4u/maven-settings-action@v4.0.0
5352 with :
54- repositories : ' [{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
55- servers : ' [{ "id": "sonatype", "username": "${{ secrets.SONATYPE_BOT_USERNAME}}", "password": "${{ secrets.SONATYPE_BOT_TOKEN}}" }]'
53+ sonatypeSnapshots : true
5654
57- - name : " Maven Build & Deploy Snapshot to Sonatype OSSRH"
58- if : ${{ github.event.repository.fork == false }}
59-
60- run : mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/
55+ - uses : s4u/maven-settings-action@v4.0.0
56+ with :
57+ sonatypeSnapshots : true
6158
62- - name : " Maven Build"
63- if : ${{ github.event.repository.fork == true }}
59+ - uses : s4u/maven-settings-action@v4.0.0
60+ if : ${{ github.event_name == 'push' }}
61+ with :
62+ servers : |
63+ [{
64+ "id": "central-portal-snapshots",
65+ "username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
66+ "password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
67+ }]
6468
65- run : mvn -B -e -Prun-its verify
69+ - name : " Maven Build & Deploy Snapshot to Sonatype OSSRH"
70+ if : ${{ github.event_name == 'push' }}
71+ run : mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/
0 commit comments