File tree Expand file tree Collapse file tree 2 files changed +17
-23
lines changed Expand file tree Collapse file tree 2 files changed +17
-23
lines changed Original file line number Diff line number Diff line change 11name : CD
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - github-release
47
58jobs :
6- snapshot :
7- if : success() && github.ref == 'refs/heads/github-release'
8- runs-on : ${{ matrix.os }}
9- strategy :
10- matrix :
11- os : [ubuntu-latest, macOS-latest, windows-latest]
9+ release :
10+ runs-on : macos-latest
1211 steps :
1312 - name : Checkout
1413 uses : actions/checkout@v2
1716 with :
1817 java-version : 8
1918 - name : Publish
20- run : ./gradlew publishAllPublicationsToOss
19+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -no-daemon --no-parallel --stacktrace -DSONATYPE_USERNAME=$SONATYPE_USERNAME -DSONATYPE_PASSWORD=$SONATYPE_PASSWORD -DGPG_PRIVATE_PASSWORD=$GPG_PRIVATE_PASSWORD -DGPG_PRIVATE_KEY=$GPG_PRIVATE_KEY
2120 env :
2221 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
2322 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
23+ SONATYPE_REPOSITORY_ID : ${{ needs.create_staging_repository.outputs.repository_id }}
2424 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
2525 GPG_PRIVATE_PASSWORD : ${{ secrets.GPG_PRIVATE_PASSWORD }}
26+ ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
27+ ORG_GRADLE_PROJECT_sonatypeUsername : ${{ secrets.SONATYPE_USERNAME }}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ plugins {
1414apply (" versions.gradle.kts" )
1515
1616group = " io.github.microutils"
17- version = " 2.1.2 "
17+ version = " 2.1.14 "
1818
1919repositories {
2020 mavenCentral()
@@ -26,6 +26,8 @@ nexusPublishing {
2626 }
2727}
2828
29+ apply (plugin = " io.github.gradle-nexus.publish-plugin" )
30+
2931kotlin {
3032 explicitApi()
3133 jvm {
@@ -127,8 +129,8 @@ tasks {
127129 }
128130}
129131
130- val sonatypeUsername : String? = System .getenv( " SONATYPE_USERNAME " )
131- val sonatypePassword : String? = System .getenv( " SONATYPE_PASSWORD " )
132+
133+
132134publishing {
133135 publications.withType<MavenPublication > {
134136 pom {
@@ -156,23 +158,13 @@ publishing {
156158 }
157159 }
158160 artifact(tasks[" dokkaJar" ])
159- repositories {
160- maven {
161- name = " oss"
162- url = uri(" https://oss.sonatype.org/service/local/staging/deployByRepositoryId/kotlin-logging/" )
163- credentials {
164- username = sonatypeUsername
165- password = sonatypePassword
166- }
167- }
168- }
169161 }
170162}
171163
172164signing {
173165 useInMemoryPgpKeys(
174- System .getenv (" GPG_PRIVATE_KEY" ),
175- System .getenv (" GPG_PRIVATE_PASSWORD" )
166+ System .getProperty (" GPG_PRIVATE_KEY" ),
167+ System .getProperty (" GPG_PRIVATE_PASSWORD" )
176168 )
177169 sign(publishing.publications)
178170}
You can’t perform that action at this time.
0 commit comments