Skip to content

Commit 49845be

Browse files
committed
Add support for custom OSSRH_USER value
This is now important because apparently it is no longer allowed to deploy to OSS Sonatype (at least not s01.oss.sonatype.org) using the plain username and password configuration -- only with the user token. And the token has different alphabet gobbledegook for the username.
1 parent b7eb4ee commit 49845be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ci-build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ if [ -f pom.xml ]; then
8080
elif [ -f "$customSettings" ]; then
8181
cp "$customSettings" "$settingsFile"
8282
else
83+
if [ -z "$OSSRH_USER" ]; then
84+
OSSRH_USER=scijava-ci
85+
fi
8386
cat >"$settingsFile" <<EOL
8487
<settings>
8588
<servers>
@@ -95,7 +98,7 @@ if [ -f pom.xml ]; then
9598
</server>
9699
<server>
97100
<id>sonatype-nexus-releases</id>
98-
<username>scijava-ci</username>
101+
<username>$OSSRH_USER</username>
99102
<password>$(escapeXML "$OSSRH_PASS")</password>
100103
</server>
101104
</servers>

github-actionify.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ process() {
129129
GPG_PASSPHRASE: \${{ secrets.GPG_PASSPHRASE }}
130130
MAVEN_USER: \${{ secrets.MAVEN_USER }}
131131
MAVEN_PASS: \${{ secrets.MAVEN_PASS }}
132+
OSSRH_USER: \${{ secrets.OSSRH_USER }}
132133
OSSRH_PASS: \${{ secrets.OSSRH_PASS }}
133134
SIGNING_ASC: \${{ secrets.SIGNING_ASC }}"
134135

0 commit comments

Comments
 (0)