Skip to content

Commit 36586e6

Browse files
committed
Add Sonatype credentials verification step
1 parent 982e8cf commit 36586e6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/maven-central.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ jobs:
7272
</settings>
7373
EOF
7474
75+
- name: Verify Sonatype Credentials
76+
run: |
77+
echo "Verifying Sonatype credentials..."
78+
echo "Username: ${{ secrets.OSSRH_USERNAME_TOKEN }}"
79+
echo "Password length: ${#OSSRH_PASSWORD_TOKEN}"
80+
81+
# Test connection to Sonatype
82+
curl -v -u "${{ secrets.OSSRH_USERNAME_TOKEN }}:${{ secrets.OSSRH_PASSWORD_TOKEN }}" \
83+
https://s01.oss.sonatype.org/service/local/user/profile
84+
85+
# Test Maven connection
86+
mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout
87+
mvn help:evaluate -Dexpression=settings.servers -q -DforceStdout
88+
7589
- name: Build and Publish
7690
env:
7791
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}

0 commit comments

Comments
 (0)