Skip to content

Commit f5e96d7

Browse files
authored
Merge pull request #97 from ligangty/master
Revert sonatype settings in github action
2 parents 1a9e5c6 + c050fb3 commit f5e96d7

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/maven-push.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,27 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v6
3333

34-
- name: Set up JDK 11 for x64
34+
- name: Set up JDK
3535
uses: actions/setup-java@v5
3636
with:
3737
java-version: '17'
3838
distribution: 'temurin'
3939
architecture: x64
4040

41-
- name: maven-settings-xml-action
42-
uses: whelk-io/maven-settings-xml-action@v22
43-
if: ${{ github.event.repository.fork == false }}
41+
- uses: s4u/maven-settings-action@v2.8.0
4442
with:
45-
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
46-
servers: '[{ "id": "sonatype", "username": "${{ secrets.SONATYPE_BOT_USERNAME}}", "password": "${{ secrets.SONATYPE_BOT_TOKEN}}" }]'
47-
43+
sonatypeSnapshots: true
44+
45+
- uses: s4u/maven-settings-action@v2.8.0
46+
if: ${{ github.event_name == 'push' }}
47+
with:
48+
servers: |
49+
[{
50+
"id": "central-portal-snapshots",
51+
"username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
52+
"password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
53+
}]
54+
4855
- name: Deploy the artifact
4956
if: ${{ github.event_name == 'push' }}
5057
run: mvn help:effective-settings -B -V clean deploy -e

.github/workflows/maven-verify.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ jobs:
3434
distribution: 'temurin'
3535
architecture: x64
3636

37-
- name: maven-settings-xml-action
38-
uses: whelk-io/maven-settings-xml-action@v22
37+
- uses: s4u/maven-settings-action@v2.8.0
3938
with:
40-
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
41-
39+
sonatypeSnapshots: true
4240

4341
- name: Build the Maven verify phase
4442
run: mvn -B -V clean verify -Prun-its -Pci

0 commit comments

Comments
 (0)