Skip to content

Commit 8b58a6a

Browse files
committed
ci: Publish to maven central
1 parent bd972cd commit 8b58a6a

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/maven-publish.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
with:
1919
java-version: '11'
2020
distribution: 'adopt'
21+
server-id: ossrh
22+
server-username: MAVEN_USERNAME
23+
server-password: MAVEN_PASSWORD
2124
- uses: actions/cache@v2
2225
with:
2326
path: ~/.m2
@@ -29,4 +32,5 @@ jobs:
2932
- name: Publish to GitHub Packages Apache Maven
3033
run: mvn -B deploy
3134
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,19 @@
8686
</scm>
8787

8888
<distributionManagement>
89+
<site>
90+
<id>unifiedbdd-automation-framework.wiki</id>
91+
<url>https://github.com/kripaliz/unifiedbdd-automation-framework/wiki</url>
92+
</site>
93+
94+
<snapshotRepository>
95+
<id>ossrh</id>
96+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
97+
</snapshotRepository>
98+
8999
<repository>
90-
<id>github</id>
91-
<name>GitHub Packages</name>
92-
<url>https://maven.pkg.github.com/kripaliz/unifiedbdd-automation-framework</url>
100+
<id>ossrh</id>
101+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
93102
</repository>
94103
</distributionManagement>
95104

0 commit comments

Comments
 (0)