-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.14 KB
/
release.yml
File metadata and controls
41 lines (37 loc) · 1.14 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
38
39
40
41
name: Publish Release to Maven Central
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to checkout and publish'
required: true
type: string
jobs:
release:
runs-on: ubuntu-20.04-self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ inputs.tag }}
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central
run: |
./mvnw -B clean deploy -PsonatypeRelease -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}