File tree Expand file tree Collapse file tree 3 files changed +100
-1
lines changed Expand file tree Collapse file tree 3 files changed +100
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to Maven Central
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v3
16
+
17
+ - name : Set up JDK
18
+ uses : actions/setup-java@v3
19
+ with :
20
+ java-version : ' 11'
21
+ distribution : ' temurin'
22
+
23
+ - name : Install GPG
24
+ run : sudo apt-get install -y gnupg
25
+
26
+ - name : Create GPG directory
27
+ run : mkdir -p ~/.gnupg
28
+
29
+ - name : Import GPG key
30
+ run : |
31
+ echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --dearmor > ~/.gnupg/secring.gpg
32
+ env :
33
+ GPG_SECRET_KEY : ${{ secrets.GPG_SECRET_KEY }}
34
+
35
+ - name : Restore gradle.properties
36
+ run : |
37
+ mkdir -p ~/.gradle/
38
+ echo "mavenCentralUsername=${{ secrets.MAVEN_CENTRAL_USERNAME }}" >> ~/.gradle/gradle.properties
39
+ echo "mavenCentralPassword=${{ secrets.MAVEN_CENTRAL_PASSWORD }}" >> ~/.gradle/gradle.properties
40
+ echo "signing.keyId=${{ secrets.SIGNING_KEY_ID }}" >> ~/.gradle/gradle.properties
41
+ echo "signing.secretKeyRingFile=$(realpath ~/.gnupg/secring.gpg)" >> ~/.gradle/gradle.properties
42
+ echo "signing.password=${{ secrets.SIGNING_PASSWORD }}" >> ~/.gradle/gradle.properties
43
+
44
+ - name : Set up Gradle
45
+ uses : gradle/gradle-build-action@v2
46
+
47
+ - name : Publish to Maven Central
48
+ run : ./gradlew publish --warning-mode all --stacktrace
Original file line number Diff line number Diff line change
1
+ mavenCentralUsername =${MAVEN_CENTRAL_USERNAME}
2
+ mavenCentralPassword =${MAVEN_CENTRAL_PASSWORD}
3
+ signing.keyId =${SIGNING_KEY_ID}
4
+ signing.secretKeyRingFile =${SIGNING_SECRET_KEY_RING_FILE}
5
+ signing.password =${SIGNING_PASSWORD}
Original file line number Diff line number Diff line change
1
+ import com.vanniktech.maven.publish.SonatypeHost
2
+
1
3
plugins {
2
4
id ' java'
3
5
id ' jacoco'
4
6
id ' org.springframework.boot' version ' 3.4.5'
5
7
id ' io.spring.dependency-management' version ' 1.1.7'
8
+ id ' com.vanniktech.maven.publish' version ' 0.28.0'
6
9
}
7
10
8
11
group = ' com.github.danbel'
9
- version = ' 0.0.1-SNAPSHOT '
12
+ version = ' 0.0.1'
10
13
11
14
java {
12
15
toolchain {
@@ -48,3 +51,46 @@ jacocoTestReport {
48
51
html. required = true
49
52
}
50
53
}
54
+
55
+ publishing {
56
+ publications {
57
+ mavenJava(MavenPublication ) {
58
+ from components. java
59
+
60
+ groupId = " io.github.danbeldev"
61
+ artifactId = " firebase-app-check-spring-boot-starter"
62
+ version = " 0.0.1"
63
+
64
+ pom {
65
+ name = " firebase-app-check-spring"
66
+ description = " Spring Boot Starter для интеграции Firebase App Check"
67
+ inceptionYear = " 2024"
68
+ url = " https://github.com/danbeldev/firebase-app-check-spring"
69
+
70
+ licenses {
71
+ license {
72
+ name = " MIT"
73
+ url = " https://opensource.org/licenses/MIT"
74
+ }
75
+ }
76
+
77
+ developers {
78
+ developer {
79
+ id = " danbel"
80
+ name = " Danila Belyakov"
81
+
82
+ }
83
+ }
84
+
85
+ scm {
86
+ url = " https://github.com/danbeldev/firebase-app-check-spring"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+ mavenPublishing {
94
+ publishToMavenCentral(SonatypeHost . CENTRAL_PORTAL )
95
+ signAllPublications()
96
+ }
You can’t perform that action at this time.
0 commit comments