Skip to content

Commit d6a313b

Browse files
authored
Merge 1911f99 into 871b642
2 parents 871b642 + 1911f99 commit d6a313b

File tree

10 files changed

+29
-47
lines changed

10 files changed

+29
-47
lines changed

clients/algoliasearch-client-java/.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
release:
10-
name: Publish to Sonatype
10+
name: Publish to Maven Central
1111
runs-on: ubuntu-22.04
1212
if: "startsWith(github.event.head_commit.message, 'chore: release')"
1313
steps:
@@ -26,8 +26,8 @@ jobs:
2626
- name: Upload Artifacts
2727
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
2828
env:
29-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
30-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
29+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
30+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
3131
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
3232
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_PRIVATE_KEY_ID }}
3333
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}

clients/algoliasearch-client-java/api/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ plugins {
99
}
1010

1111
repositories {
12-
maven {
13-
name = 'ossrh-staging-api'
14-
url = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
15-
}
12+
maven { url = "https://oss.sonatype.org/content/repositories/" }
1613
mavenCentral()
1714
}
1815

clients/algoliasearch-client-kotlin/.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
publish:
10-
name: Publish to Sonatype
10+
name: Publish to Maven Central
1111
runs-on: macos-14
1212
if: "startsWith(github.event.head_commit.message, 'chore: release')"
1313
steps:
@@ -26,8 +26,8 @@ jobs:
2626
- name: Upload Artifacts
2727
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
2828
env:
29-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
30-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
29+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
30+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
3131
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
3232
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_PRIVATE_KEY_ID }}
3333
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}

clients/algoliasearch-client-scala/.github/workflows/release.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
release:
10-
name: Publish to Sonatype
10+
name: Publish to Maven Central
1111
runs-on: ubuntu-22.04
1212
if: "startsWith(github.event.head_commit.message, 'chore: release')"
1313
steps:
@@ -24,23 +24,9 @@ jobs:
2424
- name: Compile
2525
run: sbt +compile
2626

27-
- name: Import GPG Key
28-
uses: crazy-max/ghaction-import-gpg@v6
29-
with:
30-
gpg_private_key: ${{ secrets.SIGNING_PRIVATE_KEY }}
31-
passphrase: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}
32-
fingerprint: ${{ secrets.SIGNING_PRIVATE_KEY_FINGERPRINT }}
33-
34-
- name: List GPG keys
35-
run: gpg -K
36-
37-
- name: Publish Signed Artifacts
27+
- run: sbt ci-release
3828
env:
3929
PGP_PASSPHRASE: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}
40-
run: sbt +publishSigned
41-
42-
- name: Release Bundle to Sonatype
43-
env:
44-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
45-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
46-
run: sbt sonatypeBundleRelease
30+
PGP_SECRET_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
31+
SONATYPE_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
32+
SONATYPE_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

clients/algoliasearch-client-scala/build.sbt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name := "algoliasearch-scala"
33
description := "Scala client for Algolia Search API"
44
scalaVersion := "2.13.16"
55
crossScalaVersions := Seq("2.13.12", "3.6.3")
6-
publishMavenStyle := true
76
Test / publishArtifact := false
87
licenses += ("MIT", url("https://opensource.org/licenses/MIT"))
98
homepage := Some(url("https://github.com/algolia/algoliasearch-client-scala/"))
@@ -23,8 +22,6 @@ developers += Developer(
2322
url("https://github.com/algolia/algoliasearch-client-scala/")
2423
)
2524

26-
publishTo := sonatypePublishToBundle.value
27-
2825
lazy val root = project
2926
.in(file("."))
3027
.enablePlugins(BuildInfoPlugin)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
2-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
3-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
2+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
43
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5")

config/generation.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const patterns = [
1111
'!clients/README.md',
1212
'!clients/**/.openapi-generator-ignore',
1313
'clients/**/.github/**',
14+
'!clients/**/.github/workflows/release.yml',
1415

1516
// C#
1617
'clients/algoliasearch-client-csharp/**',
@@ -38,7 +39,6 @@ export const patterns = [
3839
'clients/algoliasearch-client-dart/packages/client_core/lib/src/version.dart',
3940
'!clients/algoliasearch-client-dart/packages/*/lib/src/extension.dart',
4041
'!clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch.dart',
41-
'!clients/algoliasearch-client-dart/.github/workflows/release.yml',
4242

4343
// GO
4444
'clients/algoliasearch-client-go/algolia/**',
@@ -64,7 +64,6 @@ export const patterns = [
6464
// JavaScript
6565
'!clients/algoliasearch-client-javascript/*',
6666
'!clients/algoliasearch-client-javascript/.yarn/**',
67-
'!clients/algoliasearch-client-javascript/.github/workflows/release.yml',
6867
'!clients/algoliasearch-client-javascript/scripts/**',
6968
'!clients/algoliasearch-client-javascript/tests/**',
7069
// the release process is allowed to push changes to this file, but in general we don't because those files are generated

generators/src/main/java/com/algolia/codegen/AlgoliaScalaGenerator.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,16 @@ private CodegenProperty innerFromProperty(
150150
CodegenProperty property
151151
) {
152152
if (p == null) {
153-
this.logger.severe("Undefined property/schema for `" + name + "`. Default to type:string.");
153+
// this.logger.severe("Undefined property/schema for `" + name + "`. Default to
154+
// type:string.");
154155
return null;
155156
} else {
156-
this.logger.severe("debugging fromProperty for " + name + ": " + p);
157+
// this.logger.severe("debugging fromProperty for " + name + ": " + p);
157158
NamedSchema ns = new NamedSchema(name, p, required, schemaIsFromAdditionalProperties);
158159
CodegenProperty cpc = (CodegenProperty) this.schemaCodegenPropertyCache.get(ns);
159160
if (cpc != null) {
160-
this.logger.info("Cached fromProperty for " + name + " : " + p.getName() + " required=" + required);
161+
// this.logger.info("Cached fromProperty for " + name + " : " + p.getName() + " required=" +
162+
// required);
161163
return cpc;
162164
} else {
163165
Schema refToPropertiesSchema = ModelUtils.getSchemaFromRefToSchemaWithProperties(this.openAPI, p.get$ref());

templates/java/gradle.properties.mustache

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
GROUP={{groupId}}
22
VERSION_NAME={{packageVersion}}
33

4-
SONATYPE_HOST=DEFAULT
5-
RELEASE_SIGNING_ENABLED=true
6-
SONATYPE_AUTOMATIC_RELEASE=true
7-
84
# POM
95
POM_DESCRIPTION=Java client for Algolia Search API
106
POM_URL=https://github.com/algolia/algoliasearch-client-java
@@ -19,3 +15,8 @@ POM_DEVELOPER_NAME=The Algolia Team
1915
2016
POM_ISSUE_SYSTEM=github
2117
POM_ISSUE_URL=https://github.com/algolia/algoliasearch-client-java/issues
18+
19+
# Publishing
20+
mavenCentralPublishing=true
21+
mavenCentralAutomaticPublishing=true
22+
signAllPublications=true

templates/kotlin/gradle.properties.mustache

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ kotlin.mpp.stability.nowarn=true
66
GROUP={{groupId}}
77
VERSION_NAME={{packageVersion}}
88

9-
# OSS
10-
SONATYPE_HOST=DEFAULT
11-
RELEASE_SIGNING_ENABLED=true
12-
139
# POM
1410
POM_DESCRIPTION="Algolia is a powerful search-as-a-service solution, made easy to use with API clients, UI libraries, \
1511
and pre-built integrations. Algolia API Client for Kotlin lets you easily use the Algolia Search \
@@ -26,3 +22,8 @@ POM_DEVELOPER_NAME=The Algolia Team
2622
2723
POM_ISSUE_SYSTEM=github
2824
POM_ISSUE_URL=https://github.com/algolia/algoliasearch-client-kotlin/issues
25+
26+
# Publishing
27+
mavenCentralPublishing=true
28+
mavenCentralAutomaticPublishing=true
29+
signAllPublications=true

0 commit comments

Comments
 (0)