Skip to content

Commit

Permalink
Tweak Maven Central cred handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Jul 12, 2024
1 parent cf4ef67 commit 28c77fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .mvn/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>${env.sonatype_username}</username>
<password>${env.sonatype_password}</password>
<username>${env.nexus_username}</username>
<password>${env.nexus_password}</password>
</server>
<server>
<id>repo.spring.io</id>
Expand Down

0 comments on commit 28c77fc

Please sign in to comment.