Skip to content

Commit 4b2b28b

Browse files
committed
Fix deployment
1 parent 4f9b7a8 commit 4b2b28b

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
with:
2121
java-version: '11'
2222
distribution: 'temurin'
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2324
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2425
server-id: central
2526
server-username: MAVEN_USERNAME
@@ -44,6 +45,7 @@ jobs:
4445
with:
4546
java-version: '11'
4647
distribution: 'temurin'
48+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4749
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
4850
- name: Publish to GitHub Packages
4951
run: mvn -P github --batch-mode deploy

pom.xml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,21 @@
109109
<profiles>
110110
<profile>
111111
<id>central</id>
112-
<distributionManagement>
113-
<repository>
114-
<id>central</id>
115-
<url>https://central.sonatype.com</url>
116-
</repository>
117-
<snapshotRepository>
118-
<id>central</id>
119-
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
120-
</snapshotRepository>
121-
</distributionManagement>
112+
<build>
113+
<plugins>
114+
<plugin>
115+
<groupId>org.sonatype.central</groupId>
116+
<artifactId>central-publishing-maven-plugin</artifactId>
117+
<version>0.4.0</version>
118+
<extensions>true</extensions>
119+
<configuration>
120+
<publishingServerId>central</publishingServerId>
121+
<tokenAuth>true</tokenAuth>
122+
<autoPublish>true</autoPublish>
123+
</configuration>
124+
</plugin>
125+
</plugins>
126+
</build>
122127
</profile>
123128
<profile>
124129
<id>github</id>

0 commit comments

Comments
 (0)