Skip to content

Commit d96440f

Browse files
committed
github: add maven release action
(cherry picked from commit 6b55cc1) Signed-off-by: Tigran Mkrtchyan <[email protected]>
1 parent 2631ab1 commit d96440f

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Maven Central Repository
11+
uses: actions/setup-java@v4
12+
with:
13+
java-version: '11'
14+
distribution: 'temurin'
15+
server-id: ossrh
16+
server-username: MAVEN_USERNAME
17+
server-password: MAVEN_PASSWORD
18+
- name: Publish package
19+
run: mvn --batch-mode deploy -Pmaven-central
20+
env:
21+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
22+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@
296296
<distributionManagement>
297297
<repository>
298298
<id>dcache.org</id>
299+
<name>dCache.ORG Maven Repository</name>
299300
<url>https://download.dcache.org/nexus/content/repositories/releases</url>
300301
</repository>
301302
<snapshotRepository>
@@ -335,6 +336,16 @@
335336
</plugins>
336337
</build>
337338
</profile>
339+
<profile>
340+
<id>maven-central</id>
341+
<distributionManagement>
342+
<repository>
343+
<id>ossrh</id>
344+
<name>Central Repository OSSRH</name>
345+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
346+
</repository>
347+
</distributionManagement>
348+
</profile>
338349
</profiles>
339350

340351
</project>

0 commit comments

Comments
 (0)