Tweak Maven Central cred handling

This commit is contained in:
Dave Syer
2024-07-12 10:51:41 +01:00
parent cf4ef671a9
commit 28c77fc91d
2 changed files with 6 additions and 2 deletions

View File

@@ -33,5 +33,9 @@ jobs:
run: |
echo "${signing_key}" > private.asc
gpg --import --batch --no-tty private.asc
token=`curl -H "Accept: application/json" -H "Content-Type: application/json" --data '{"u":"'$(echo -n $sonatype_username | base64)'","p":"'$(echo -n $sonatype_password | base64)'"}' -u $sonatype_username:$sonatype_password https://oss.sonatype.org/service/siesta/wonderland/authenticate | jq -r .t`
creds=`curl -H "Accept: application/json" -H "Content-Type: application/json" -H "X-NX-AuthTicket: $token" -u $sonatype_username:$sonatype_password https://oss.sonatype.org/service/siesta/usertoken/current`
export nexus_username=`echo $creds | jq -r .nameCode`
export nexus_password=`echo $creds | jq -r .passCode`
./mvnw -B deploy -s .mvn/settings.xml