-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (31 loc) · 912 Bytes
/
maven-deploy.yml
File metadata and controls
36 lines (31 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Maven Deploy
on:
push:
tags:
- 'v*'
jobs:
deploy:
name: maven deploy
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
cache: maven
java-version: '17'
distribution: 'temurin'
server-id: central # <publishingServerId> in pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Deploy to Maven Central
run: |
chmod +x ./mvnw
./mvnw clean deploy -DskipTests -B
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}