File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to Maven Central
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*.*.*' # Triggers on version tags like v1.0.0, v0.1.0, etc.
7
+
8
+ jobs :
9
+ build-and-publish :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Set up JDK 11
17
+ uses : actions/setup-java@v4
18
+ with :
19
+ distribution : ' temurin'
20
+ java-version : ' 11'
21
+ cache : ' gradle'
22
+
23
+ - name : Import GPG key
24
+ run : |
25
+ echo "$GPG_PRIVATE_KEY" | gpg --batch --import
26
+ env :
27
+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
28
+
29
+ - name : Publish to Maven Central
30
+ env :
31
+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.OSSRH_USERNAME }}
32
+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.OSSRH_PASSWORD }}
33
+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
34
+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
35
+ run : ./gradlew publish --no-daemon --stacktrace
You can’t perform that action at this time.
0 commit comments