Skip to content

Commit 16a653d

Browse files
committed
Update release workflow and publishing configuration
1 parent 6c2ea87 commit 16a653d

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
echo "${{secrets.SIGNING_KEY}}" > ~/.gradle/secring.gpg.b64
2525
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
2626
- name: Publish package
27-
run: ./gradlew publish -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
27+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
2828
env:
2929
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3030
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

build.gradle

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id 'maven-publish'
44
id 'signing'
55
id 'org.unbroken-dome.test-sets' version("4.1.0")
6+
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
67
}
78
repositories {
89
mavenCentral()
@@ -94,6 +95,9 @@ test {
9495
}
9596
}
9697

98+
ext.ossrhUsername = System.getenv('MAVEN_USERNAME')
99+
ext.ossrhPassword = System.getenv('MAVEN_PASSWORD')
100+
97101
publishing {
98102
publications {
99103
mavenJava(MavenPublication) {
@@ -134,12 +138,9 @@ publishing {
134138
}
135139

136140
repositories {
137-
String ossrhUsername = System.getenv('MAVEN_USERNAME')
138-
String ossrhPassword = System.getenv('MAVEN_PASSWORD')
139-
140141
maven {
141-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
142-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
142+
def releasesRepoUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
143+
def snapshotsRepoUrl = "https://central.sonatype.com/repository/maven-snapshots/"
143144
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
144145
credentials {
145146
username ossrhUsername
@@ -149,6 +150,17 @@ publishing {
149150
}
150151
}
151152

153+
nexusPublishing {
154+
repositories {
155+
sonatype {
156+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
157+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
158+
username = ossrhUsername
159+
password = ossrhPassword
160+
}
161+
}
162+
}
163+
152164
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
153165

154166
if (isReleaseVersion && !project.hasProperty("skipSigning")) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
group = com.bloxbean.cardano
22
artifactId = aiken-java-binding
3-
version = 0.1.0
3+
version = 0.1.1-preview1
44

0 commit comments

Comments
 (0)