Skip to content

Commit f9a9abf

Browse files
committed
chore: add maven central publishing
1 parent da8fadc commit f9a9abf

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ jobs:
2222
- name: Build with Maven
2323
run: mvn clean package
2424

25+
- name: Publish to Maven CEntral
26+
run: mvn --batch-mode deploy
27+
env:
28+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
29+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
30+
2531
- name: Publish to GitHub Packages
26-
run: mvn deploy
32+
run: mvn --batch-mode deploy
2733
env:
2834
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,19 @@
6262
<version>${junit.version}</version>
6363
</dependency>
6464
</dependencies>
65+
66+
<build>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.sonatype.central</groupId>
70+
<artifactId>central-publishing-maven-plugin</artifactId>
71+
<version>0.7.0</version>
72+
<extensions>true</extensions>
73+
<configuration>
74+
<publishingServerId>central</publishingServerId>
75+
<autoPublish>true</autoPublish>
76+
</configuration>
77+
</plugin>
78+
</plugins>
79+
</build>
6580
</project>

0 commit comments

Comments
 (0)