Skip to content

Commit 727c9c9

Browse files
Add deploy.yml
1 parent 444e78a commit 727c9c9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v3
18+
with:
19+
distribution: temurin
20+
java-version: 17
21+
cache: maven
22+
server-id: ossrh
23+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
24+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
25+
26+
- name: Build and deploy with Maven
27+
run: mvn --batch-mode clean deploy -P gpg
28+
29+
env:
30+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
31+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 commit comments

Comments
 (0)