Skip to content

Commit ceb75a4

Browse files
committed
let's goo
1 parent a7def05 commit ceb75a4

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

.github/workflows/maven-central-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
dry_run:
1414
description: "Dry run - publish to local Maven repo only"
1515
required: false
16-
default: true
16+
default: false
1717
type: boolean
1818

1919
jobs:
@@ -122,7 +122,7 @@ jobs:
122122
sed -i "s/version = .*/version = \"${{ github.event.inputs.version }}\"/" build.gradle.kts
123123
124124
- name: Publish to Maven Central
125-
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
125+
if: github.event_name == 'release' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == false)
126126
run: |
127127
cd bindings/kotlin
128128
./gradlew publish --no-daemon --no-parallel
@@ -133,7 +133,7 @@ jobs:
133133
ORG_GRADLE_PROJECT_BASE64_ENCODED_ASCII_ARMORED_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_BASE64_ENCODED_ASCII_ARMORED_SIGNING_KEY }}
134134

135135
- name: Dry run - Local publish only
136-
if: github.event_name != 'release' && (github.event_name != 'workflow_dispatch' || github.event.inputs.dry_run == 'true')
136+
if: github.event_name != 'release' && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' || github.event.inputs.dry_run == true)
137137
run: |
138138
cd bindings/kotlin
139139
echo "Dry run: Publishing to local Maven repository only"

bindings/kotlin/build.gradle.kts

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -140,24 +140,17 @@ publishing {
140140
}
141141
repositories {
142142
maven {
143-
name = "ossrh"
144-
url =
145-
uri(
146-
if (version.toString().endsWith("SNAPSHOT")) {
147-
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
148-
} else {
149-
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
150-
}
151-
)
152-
val sonatypeUsername =
153-
providers.environmentVariable("ORG_GRADLE_PROJECT_SONATYPE_USERNAME")
154-
val sonatypePassword =
155-
providers.environmentVariable("ORG_GRADLE_PROJECT_SONATYPE_PASSWORD")
156-
if (sonatypeUsername.isPresent && sonatypePassword.isPresent) {
157-
credentials {
158-
username = sonatypeUsername.get()
159-
password = sonatypePassword.get()
160-
}
143+
name = "central"
144+
url = uri("https://central.sonatype.com/api/v1/publisher/upload")
145+
credentials {
146+
username =
147+
providers
148+
.environmentVariable("ORG_GRADLE_PROJECT_SONATYPE_USERNAME")
149+
.getOrElse("")
150+
password =
151+
providers
152+
.environmentVariable("ORG_GRADLE_PROJECT_SONATYPE_PASSWORD")
153+
.getOrElse("")
161154
}
162155
}
163156
}

bindings/kotlin/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = "iota-sdk-jvm"
1+
rootProject.name = "iota-sdk"
22

33
include(":lib")
44

0 commit comments

Comments
 (0)