File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - dev
7+ - snapshot
8+ workflow_dispatch :
79
810jobs :
911 build-and-deploy-docs :
2527 restore-keys : ${{ runner.os }}-gradle
2628
2729 - name : Publish snapshot
30+ env :
31+ PGP_PRIVATE_SIGNING_KEY : ${{ secrets.PGP_PRIVATE_SIGNING_KEY }}
32+ PGP_PRIVATE_SIGNING_KEY_PASSWORD : ${{ secrets.PGP_PRIVATE_SIGNING_KEY_PASSWORD }}
33+ SONATYPE_MAVEN_CENTRAL_USERNAME : ${{ secrets.SONATYPE_MAVEN_CENTRAL_USERNAME }}
34+ SONATYPE_MAVEN_CENTRAL_PASSWORD : ${{ secrets.SONATYPE_MAVEN_CENTRAL_PASSWORD }}
2835 run : ./gradlew publishSnapshotPublicationToSonatypeRepository
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ val ciSigningPassword: String? = System.getenv("PGP_PRIVATE_SIGNING_KEY_PASSWORD
1111val shouldSignCIRelease: Boolean
1212 get() = ! ciSigningKey.isNullOrEmpty() && ! ciSigningPassword.isNullOrEmpty()
1313
14+ val lastCommitHash: String = providers.exec {
15+ commandLine(" git" , " rev-parse" , " --short" , " HEAD" )
16+ }.standardOutput.asText.map { it.trim() }.get()
17+
1418plugins {
1519 alias(libs.plugins.google.protobuf)
1620 checkstyle
@@ -161,7 +165,7 @@ publishing {
161165 create<MavenPublication >(" snapshot" ) {
162166 groupId = mavenGroupId
163167 artifactId = mavenArtifactId
164- version = " ${rootProject.version} -SNAPSHOT"
168+ version = " ${rootProject.version} -lastCommitHash- SNAPSHOT"
165169
166170 afterEvaluate {
167171 from(components[" java" ])
You can’t perform that action at this time.
0 commit comments