Skip to content

Commit

Permalink
Attempt simpler creds for Maven release
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Jul 12, 2024
1 parent 28c77fc commit 4100b6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@ jobs:
env:
spring_username: ${{ secrets.ARTIFACTORY_USERNAME }}
spring_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
sonatype_password: ${{ secrets.SONATYPE_PASSWORD }}
sonatype_username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
sonatype_password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
signing_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
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.nexus_username}</username>
<password>${env.nexus_password}</password>
<username>${env.sonatype_username}</username>
<password>${env.sonatype_password}</password>
</server>
<server>
<id>repo.spring.io</id>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ limitations under the License.
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>repo.spring.io</id>
Expand Down

0 comments on commit 4100b6b

Please sign in to comment.