-
-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (31 loc) · 1.13 KB
/
maven-publish.yml
File metadata and controls
37 lines (31 loc) · 1.13 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: Publish to Maven Central
on:
workflow_dispatch:
concurrency:
group: "publish"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-disabled: true
# Do the compile and test separate from publishing,
# else it could start publishing before all modules have been verified.
# Also disable configuration cache as it won't be used or saved
- name: Compile and test
run: ./gradlew build --no-configuration-cache
- name: Release
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
ORG_GRADLE_PROJECT_mavenGpgSecretKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_mavenGpgKeyId: ${{ secrets.GPG_KEY_ID }}