Skip to content

Commit b7c8680

Browse files
authored
chore: update Sonatype token (#257)
* chore: update Sonatype token * chore: update Sonatype token
1 parent 61e13a6 commit b7c8680

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ jobs:
3838
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
3939
4040
echo "Build and publish"
41-
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
42-
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
43-
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
41+
sed -i -e "s,sonatypeToken=,sonatypeToken=SONATYPE_TOKEN_USERNAME,g" gradle.properties
42+
SONATYPE_TOKEN_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_TOKEN_PASSWORD" | sed -e 's/[\/&]/\\&/g')
43+
sed -i -e "s,sonatypeTokenPassword=,sonatypeTokenPassword=$SONATYPE_TOKEN_PASSWORD_ESCAPED,g" gradle.properties
4444
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
4545
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
4646
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties
4747
env:
4848
GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}"
4949
GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }}
5050
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
51-
SONATYPE_PASSWORD: ${{ secrets.SYNCED_SONATYPE_PASSWORD }}
52-
SONATYPE_USERNAME: ${{ secrets.SYNCED_SONATYPE_USERNAME }}
51+
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SYNCED_SONATYPE_TOKEN_PASSWORD }}
52+
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
5353

5454
- uses: actions/setup-node@v2
5555
with:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ subprojects { project ->
154154
name = "mavencentral"
155155
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
156156
credentials {
157-
username sonatypeUsername
158-
password sonatypePassword
157+
username sonatypeToken
158+
password sonatypeTokenPassword
159159
}
160160
}
161161
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ signing.keyId=
2626
signing.password=
2727
signing.secretKeyRingFile=
2828

29-
sonatypeUsername=
30-
sonatypePassword=
29+
sonatypeToken=
30+
sonatypeTokenPassword=

0 commit comments

Comments
 (0)