Commit 29bbf73 Jan Phillip Kretzschmar
committed
1 parent a1d8b81 commit 29bbf73 Copy full SHA for 29bbf73
File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to Maven Central
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ jobs :
8
+ publish :
9
+ name : Publish Release Artifacts
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Setup timezone
14
+ run : |
15
+ sudo timedatectl set-timezone Europe/Berlin
16
+ timedatectl
17
+ - name : Check out the repo
18
+ uses : actions/checkout@v3
19
+ - name : Validate Gradle wrapper
20
+ uses : gradle/wrapper-validation-action@v1
21
+ - name : Set up Java 11 JDK
22
+ uses : actions/setup-java@v2
23
+ with :
24
+ java-version : ' 11'
25
+ distribution : ' temurin'
26
+ architecture : x64
27
+ cache : ' gradle'
28
+ check-latest : true
29
+ - name : Change wrapper permissions
30
+ run : chmod +x ./gradlew
31
+ - name : Decode GPG Key
32
+ run : |
33
+ mkdir -p ~/.gradle/
34
+ echo "${{secrets.OSSRH_GPG_SECRET_KEY}}" > ~/.gradle/secring.gpg.b64
35
+ base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
36
+ - name : Publish package
37
+ # wraped the signing.password with single quotes as the password could contain special characters
38
+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${{secrets.OSSRH_GPG_SECRET_KEY_ID}} -Psigning.password='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
39
+ env :
40
+ MAVEN_USERNAME : ${{secrets.OSSRH_USERNAME}}
41
+ MAVEN_PASSWORD : ${{secrets.OSSRH_PASSWORD}}
42
+ - name : Upload Artifacts
43
+ uses : actions/upload-artifact@v2
44
+ with :
45
+ name : release-build-libs
46
+ path : build/libs
47
+ retention-days : 3
You can’t perform that action at this time.
0 commit comments