File tree Expand file tree Collapse file tree 4 files changed +22
-51
lines changed
Expand file tree Collapse file tree 4 files changed +22
-51
lines changed Original file line number Diff line number Diff line change 1- name : Publish to Maven Central (Staged)
2-
1+ name : Publish and close to staging repo
2+ # Uploads to a new staging repository and closes it, making it available for viewing on the Maven portal
3+ # The repo will then need to be manually released on the portal before it is available on Maven Central
34on :
45 release :
56 types : [published]
@@ -23,13 +24,13 @@ jobs:
2324 - name : Grant execute permission for gradlew
2425 run : chmod +x gradlew
2526
26- - name : Publish to Sonatype Staging Repository
27+ - name : Publish and Close Sonatype Staging Repository
2728 env :
2829 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
2930 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
3031 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
3132 GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
3233 run : |
33- # Use --no-scan to prevent sending build data to Gradle's servers
34- # The publishToSonatype task uploads to the staging repo, but does not close it
35- ./gradlew publishToSonatype --no-scan
34+ # publishToSonatype: Uploads artifacts to a new staging repository.
35+ # closeSonatypeRepository: Closes the staging repository, running validations and making it visible in the portal.
36+ ./gradlew publishToSonatype closeSonatypeStagingRepository --no-scan
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ buildscript {
1414
1515plugins {
1616 id " io.github.gradle-nexus.publish-plugin" version " 2.0.0"
17- id ' signing'
1817}
1918
2019allprojects {
20+ group = " mil.nga.geopackage"
21+ version = " 6.7.5"
22+
2123 repositories {
2224 google()
2325 mavenCentral()
@@ -36,11 +38,17 @@ nexusPublishing {
3638 }
3739}
3840
39- signing {
40- def signingKey = System . getenv(" GPG_PRIVATE_KEY" )
41- def signingPassword = System . getenv(" GPG_PASSWORD" )
41+ subprojects {
42+ apply plugin : ' signing' // apply signing plugin to all subprojects
4243
43- if (signingKey != null && signingPassword != null ) {
44- useInMemoryPgpKeys(signingKey, signingPassword)
44+ afterEvaluate {
45+ def signingKey = System . getenv(" GPG_PRIVATE_KEY" )
46+ def signingPassword = System . getenv(" GPG_PASSWORD" )
47+ if (signingKey != null && signingPassword != null ) {
48+ signing {
49+ useInMemoryPgpKeys(signingKey, signingPassword)
50+ sign publishing. publications
51+ }
52+ }
4553 }
4654}
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ plugins {
44 id " maven-publish"
55}
66
7- group = " mil.nga.geopackage"
87archivesBaseName = " geopackage-android"
9- version = " 6.7.5"
108
119android {
1210 namespace ' mil.nga.geopackage'
@@ -107,7 +105,7 @@ afterEvaluate {
107105
108106 groupId = group
109107 artifactId = archivesBaseName
110- version = version
108+
111109 pom {
112110 name = ' GeoPackage Android'
113111 packaging = ' aar'
You can’t perform that action at this time.
0 commit comments