-
-
Notifications
You must be signed in to change notification settings - Fork 38
38 lines (36 loc) · 1.31 KB
/
release.yml
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
name: Release to Maven Central
on:
workflow_dispatch:
inputs:
close_and_release:
required: false
default: true
type: boolean
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
#ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
#ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.TOKEN_NAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.TOKEN_KEY }}
jobs:
publish:
runs-on: macos-latest
steps:
- run: echo "Publishing to Maven Central..."
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/[email protected]
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
cache-read-only: true
- name: Publish
run: ./gradlew -DLibrariesOnly=true publishAllPublicationsToMavenCentral
- name: Close and release
if: inputs.close_and_release
run: ./gradlew -DLibrariesOnly=true releaseRepository --configuration-cache