Skip to content

Commit 5232eb9

Browse files
authored
Create cd_maven.yml
1 parent 632b5f9 commit 5232eb9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/cd_maven.yml

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

0 commit comments

Comments
 (0)