-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (30 loc) · 1.01 KB
/
release.yml
File metadata and controls
37 lines (30 loc) · 1.01 KB
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
37
name: Maven Central Deploy
run-name: Maven Central Deploy - ${{ github.ref_name }}
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: maven-central-release
settings-path: ${{ github.workspace }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Build with Tests
run: mvn -B clean install
- name: Publish to Maven Central
if: github.event_name == 'release'
run: mvn deploy -DdryRun=true -s $GITHUB_WORKSPACE/settings.xml
env:
MAVEN_CENTRAL_RELEASES_USERNAME: ${{ secrets.MAVEN_CENTRAL_RELEASES_USERNAME }}
MAVEN_CENTRAL_RELEASES_PASSWORD: ${{ secrets.MAVEN_CENTRAL_RELEASES_PASSWORD }}