Skip to content

Commit

Permalink
chore: update Sonatype token (#257)
Browse files Browse the repository at this point in the history
* chore: update Sonatype token

* chore: update Sonatype token
  • Loading branch information
kikoso authored Jun 25, 2024
1 parent 61e13a6 commit b7c8680
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ jobs:
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
echo "Build and publish"
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,sonatypeToken=,sonatypeToken=SONATYPE_TOKEN_USERNAME,g" gradle.properties
SONATYPE_TOKEN_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_TOKEN_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypeTokenPassword=,sonatypeTokenPassword=$SONATYPE_TOKEN_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties
env:
GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}"
GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SYNCED_SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SYNCED_SONATYPE_USERNAME }}
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SYNCED_SONATYPE_TOKEN_PASSWORD }}
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}

- uses: actions/setup-node@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ subprojects { project ->
name = "mavencentral"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username sonatypeUsername
password sonatypePassword
username sonatypeToken
password sonatypeTokenPassword
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ signing.keyId=
signing.password=
signing.secretKeyRingFile=

sonatypeUsername=
sonatypePassword=
sonatypeToken=
sonatypeTokenPassword=

0 comments on commit b7c8680

Please sign in to comment.