-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.58 KB
/
release-maven-central.yml
File metadata and controls
48 lines (41 loc) · 1.58 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
42
43
44
45
46
47
48
name: Publish Maven Central
run-name: ${{ github.actor }} triggered Maven Central release on ${{ github.event.inputs.ref || github.ref_name }}
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
ref:
description: "Branch or tag to publish (e.g. develop or v4.6.4)"
required: true
jobs:
release-maven-central:
runs-on: [self-hosted, corese-stack-ubuntu-24]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "gradle"
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish to Maven Central via Vanniktech
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
run: ./gradlew publishToMavenCentral
- name: Manual Release Reminder
run: echo "Upload complete. Please finalize the deployment at https://central.sonatype.com/publishing/deployments"