Skip to content

Commit 6006187

Browse files
authored
Update maven-publish.yml
1 parent b42121c commit 6006187

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/maven-publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,24 @@ jobs:
2323
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
2424
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
2525

26+
- name: Write settings.xml for Maven Central
27+
run: |
28+
mkdir -p $HOME/.m2
29+
cat <<EOF > $HOME/.m2/settings.xml
30+
<settings>
31+
<servers>
32+
<server>
33+
<id>central</id>
34+
<username>${MAVEN_USERNAME}</username>
35+
<password>${MAVEN_PASSWORD}</password>
36+
</server>
37+
</servers>
38+
</settings>
39+
EOF
40+
env:
41+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
42+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
43+
2644
- name: Publish to Maven Central
2745
run: mvn clean deploy -DperformRelease=true -X -e
2846
env:

0 commit comments

Comments
 (0)