Skip to content

Commit 9fe820f

Browse files
committed
ci: add release-to-central workflow
Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
1 parent 86a9b26 commit 9fe820f

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Set up Java
13+
uses: actions/setup-java@v4
14+
with:
15+
java-version: '17'
16+
distribution: 'temurin'
17+
cache: 'maven'
18+
server-id: central
19+
server-username: MAVEN_USERNAME
20+
server-password: MAVEN_PASSWORD
21+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
22+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
23+
24+
- name: Build and Test
25+
run: mvn clean verify
26+
27+
- name: Publish to Maven Central
28+
run: |
29+
mvn --batch-mode \
30+
-Prelease \
31+
-Pjavadoc \
32+
deploy
33+
env:
34+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
35+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
36+
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}

0 commit comments

Comments
 (0)