@@ -12,13 +12,13 @@ jobs:
1212 steps :
1313 - name : Test OSSRH Token
1414 run : |
15- echo "Testing OSSRH token validity..."
15+ echo "Testing Central Publisher Portal token validity..."
1616
17- # Test basic authentication
17+ # Test basic authentication with Central Portal API
1818 echo "1. Testing basic authentication..."
1919 auth_response=$(curl -s -w "%{http_code}" -u "${{ secrets.OSSRH_USERNAME_2 }}:${{ secrets.OSSRH_TOKEN_2 }}" \
2020 -H "Accept: application/json" \
21- https://ossrh-staging-api.central.sonatype.com/service/local /user/profile )
21+ https://ossrh-staging-api.central.sonatype.com/api/v1 /user)
2222
2323 auth_http_code="${auth_response: -3}"
2424 auth_body="${auth_response%???}"
@@ -30,24 +30,24 @@ jobs:
3030 echo "User profile: $auth_body"
3131 elif [ "$auth_http_code" = "401" ]; then
3232 echo "❌ Token is invalid or expired (401 Unauthorized)"
33- echo "Please regenerate your OSSRH token"
33+ echo "Please regenerate your Central Portal token"
3434 exit 1
3535 elif [ "$auth_http_code" = "403" ]; then
3636 echo "❌ Token is valid but lacks permissions (403 Forbidden)"
37- echo "Check your OSSRH account permissions"
37+ echo "Check your Central Portal account permissions"
3838 exit 1
3939 else
4040 echo "❌ Unexpected response: HTTP $auth_http_code"
4141 echo "Response: $auth_body"
4242 exit 1
4343 fi
4444
45- # Test staging access
45+ # Test staging access with Central Portal API
4646 echo ""
4747 echo "2. Testing staging repository access..."
4848 staging_response=$(curl -s -w "%{http_code}" -u "${{ secrets.OSSRH_USERNAME_2 }}:${{ secrets.OSSRH_TOKEN_2 }}" \
4949 -H "Accept: application/json" \
50- https://ossrh-staging-api.central.sonatype.com/service/local /staging/profile_repositories )
50+ https://ossrh-staging-api.central.sonatype.com/api/v1 /staging/profiles )
5151
5252 staging_http_code="${staging_response: -3}"
5353 staging_body="${staging_response%???}"
5656
5757 if [ "$staging_http_code" = "200" ]; then
5858 echo "✅ Staging repository access successful"
59+ echo "Available profiles: $staging_body"
5960 else
6061 echo "❌ Staging repository access failed: HTTP $staging_http_code"
6162 echo "Response: $staging_body"
0 commit comments