Skip to content

Commit c23fd0b

Browse files
authored
fix
1 parent bbd920d commit c23fd0b

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/pipeline.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ jobs:
8181
echo "${{ secrets.GPG_OWNERTRUST }}" | base64 --decode | gpg2 --import-ownertrust
8282
export GPG_TTY=$(tty)
8383
export GPG_EXECUTABLE=gpg2
84+
- name: Write .m2/settings.xml 💾
85+
run: |
86+
mkdir -p ~/.m2
87+
cat <<EOF > ~/.m2/settings.xml
88+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
89+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
90+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
91+
<servers>
92+
<server>
93+
<id>maven</id>
94+
<username>${{ secrets.SONATYPE_USERNAME }}</username>
95+
<password>${{ secrets.SONATYPE_PASSWORD }}</password>
96+
</server>
97+
</servers>
98+
</settings>
99+
EOF
84100
- name: Update pom.xml version 💾
85101
run: |
86102
mvn versions:set -DnewVersion=${{ needs.bump.outputs.major_version }}.${{ needs.bump.outputs.minor_version }}.${{ needs.bump.outputs.build_version }} -DgenerateBackupPoms=false

pom.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,19 @@
9393
</dependencies>
9494

9595
<build>
96-
<!-- <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>
97-
<artifactId>maven-shade-plugin</artifactId> ... </plugin> </plugins> </pluginManagement> -->
9896
<pluginManagement>
9997
<plugins>
98+
<plugin>
99+
<groupId>org.sonatype.central</groupId>
100+
<artifactId>central-publishing-maven-plugin</artifactId>
101+
<version>0.7.0</version>
102+
<extensions>true</extensions>
103+
<configuration>
104+
<publishingServerId>${repos.id}</publishingServerId>
105+
<autoPublish>true</autoPublish>
106+
<waitUntil>published</waitUntil>
107+
</configuration>
108+
</plugin>
100109
<plugin>
101110
<groupId>org.apache.maven.plugins</groupId>
102111
<artifactId>maven-source-plugin</artifactId>
@@ -407,6 +416,10 @@
407416
<plugin>
408417
<artifactId>maven-jar-plugin</artifactId>
409418
</plugin>
419+
<plugin>
420+
<groupId>org.sonatype.central</groupId>
421+
<artifactId>central-publishing-maven-plugin</artifactId>
422+
</plugin>
410423
<plugin>
411424
<groupId>com.google.code.maven-replacer-plugin</groupId>
412425
<artifactId>replacer</artifactId>

0 commit comments

Comments
 (0)