Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-alpha.1 #2

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- next

jobs:
lint:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish-sonatype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to Sonatype in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/clear-street/studio-sdk-java/actions/workflows/publish-sonatype.yml
name: Publish Sonatype
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: |
8
17
cache: gradle

- name: Set up Gradle
uses: gradle/gradle-build-action@v2

- name: Publish to Sonatype
run: |
./gradlew --parallel --no-daemon publish
env:
SONATYPE_USERNAME: ${{ secrets.STUDIO_SDK_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.STUDIO_SDK_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY_ID: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
GPG_SIGNING_KEY: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
23 changes: 23 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Doctor
on:
pull_request:
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'clear-street/studio-sdk-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
SONATYPE_USERNAME: ${{ secrets.STUDIO_SDK_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.STUDIO_SDK_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY_ID: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
GPG_SIGNING_KEY: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.STUDIO_SDK_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0-alpha.1"
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 0.1.0-alpha.1 (2024-07-15)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/clear-street/studio-sdk-java/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

### Features

* **api:** update via SDK Studio ([#3](https://github.com/clear-street/studio-sdk-java/issues/3)) ([1af60f8](https://github.com/clear-street/studio-sdk-java/commit/1af60f8d1ed8cbe45cff1bb5ab810a0b22950a4a))


### Chores

* configure new SDK language ([14da204](https://github.com/clear-street/studio-sdk-java/commit/14da204ae5ab74c4fdef0f5c05152ff2b5d22a8e))
* go live ([#1](https://github.com/clear-street/studio-sdk-java/issues/1)) ([ed9cf91](https://github.com/clear-street/studio-sdk-java/commit/ed9cf9189ee9eb83af9ac9d5cf3d20349a00a911))
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Studio SDK Java API Library

[![Maven Central](https://img.shields.io/maven-central/v/com.studio_sdk.api/studio-sdk-java)](https://central.sonatype.com/artifact/com.studio_sdk.api/studio-sdk-java/0.0.1-alpha.0)
<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/io.clearstreet.studio/studio-sdk-java)](https://central.sonatype.com/artifact/io.clearstreet.studio/studio-sdk-java/0.1.0-alpha.1)

<!-- x-release-please-end -->

The Studio SDK Java SDK provides convenient access to the Studio SDK REST API from applications written in Java. It includes helper classes with helpful types and documentation for every request and response property.

Expand All @@ -10,7 +14,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).

## Documentation

The REST API documentation can be found [on docs.clearstreet.io](https://docs.clearstreet.io/studio).
The REST API documentation can be found on [docs.clearstreet.io](https://docs.clearstreet.io/studio).

---

Expand All @@ -20,27 +24,31 @@ The REST API documentation can be found [on docs.clearstreet.io](https://docs.c

#### Gradle

<!-- x-release-please-start-version -->

```kotlin
implementation("com.studio_sdk.api:studio-sdk-java:0.0.1-alpha.0")
implementation("io.clearstreet.studio:studio-sdk-java:0.1.0-alpha.1")
```

#### Maven

```xml
<dependency>
<groupId>com.studio_sdk.api</groupId>
<groupId>io.clearstreet.studio</groupId>
<artifactId>studio-sdk-java</artifactId>
<version>0.0.1-alpha.0</version>
<version>0.1.0-alpha.1</version>
</dependency>
```

<!-- x-release-please-end -->

### Configure the client

Use `StudioSdkOkHttpClient.builder()` to configure the client. At a minimum you need to set `.bearerToken()`:

```java
import com.studio_sdk.api.client.StudioSdkClient;
import com.studio_sdk.api.client.okhttp.StudioSdkOkHttpClient;
import io.clearstreet.studio.client.StudioSdkClient;
import io.clearstreet.studio.client.okhttp.StudioSdkOkHttpClient;

StudioSdkClient client = StudioSdkOkHttpClient.builder()
.bearerToken("My Bearer Token")
Expand Down Expand Up @@ -73,8 +81,8 @@ To create a new entity, first use the `EntityRetrieveParams` builder to specify
then pass that to the `retrieve` method of the `entities` service.

```java
import com.studio_sdk.api.models.Entity;
import com.studio_sdk.api.models.EntityRetrieveParams;
import io.clearstreet.studio.models.Entity;
import io.clearstreet.studio.models.EntityRetrieveParams;

EntityRetrieveParams params = EntityRetrieveParams.builder()
.entityId("<your_entity_id>")
Expand Down Expand Up @@ -242,7 +250,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/studio-sdk-java/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/clear-street/studio-sdk-java/issues) with questions, bugs, or suggestions.

## Requirements

Expand Down
44 changes: 44 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

warnings=()
errors=()

if [ -z "${SONATYPE_USERNAME}" ]; then
warnings+=("The STUDIO_SDK_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${SONATYPE_PASSWORD}" ]; then
warnings+=("The STUDIO_SDK_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_KEY}" ]; then
warnings+=("The STUDIO_SDK_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
warnings+=("The STUDIO_SDK_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenWarnings=${#warnings[@]}

if [[ lenWarnings -gt 0 ]]; then
echo -e "Found the following warnings in the release environment:\n"

for warning in "${warnings[@]}"; do
echo -e "- $warning\n"
done
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
echo -e "Found the following errors in the release environment:\n"

for error in "${errors[@]}"; do
echo -e "- $error\n"
done

exit 1
fi

echo "The environment is ready to push releases!"
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ plugins {
}

allprojects {
group = "com.studio_sdk.api"
version = "0.0.1-alpha.0"
group = "io.clearstreet.studio"
version = "0.1.0-alpha.1" // x-release-please-version
}

nexusPublishing {
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/studio-sdk.publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ configure<PublishingExtension> {
}

scm {
connection.set("scm:git:git://github.com/stainless-sdks/studio-sdk-java.git")
developerConnection.set("scm:git:git://github.com/stainless-sdks/studio-sdk-java.git")
url.set("https://github.com/stainless-sdks/studio-sdk-java")
connection.set("scm:git:git://github.com/clear-street/studio-sdk-java.git")
developerConnection.set("scm:git:git://github.com/clear-street/studio-sdk-java.git")
url.set("https://github.com/clear-street/studio-sdk-java")
}

versionMapping {
Expand Down
67 changes: 67 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "simple",
"extra-files": [
"README.md",
"build.gradle.kts"
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.studio_sdk.api.client.okhttp
package io.clearstreet.studio.client.okhttp

import com.google.common.collect.ListMultimap
import com.google.common.collect.MultimapBuilder
import com.studio_sdk.api.core.RequestOptions
import com.studio_sdk.api.core.http.HttpClient
import com.studio_sdk.api.core.http.HttpMethod
import com.studio_sdk.api.core.http.HttpRequest
import com.studio_sdk.api.core.http.HttpRequestBody
import com.studio_sdk.api.core.http.HttpResponse
import com.studio_sdk.api.errors.StudioSdkIoException
import io.clearstreet.studio.core.RequestOptions
import io.clearstreet.studio.core.http.HttpClient
import io.clearstreet.studio.core.http.HttpMethod
import io.clearstreet.studio.core.http.HttpRequest
import io.clearstreet.studio.core.http.HttpRequestBody
import io.clearstreet.studio.core.http.HttpResponse
import io.clearstreet.studio.errors.StudioSdkIoException
import java.io.IOException
import java.io.InputStream
import java.net.Proxy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// File generated from our OpenAPI spec by Stainless.

package com.studio_sdk.api.client.okhttp
package io.clearstreet.studio.client.okhttp

import com.fasterxml.jackson.databind.json.JsonMapper
import com.studio_sdk.api.client.StudioSdkClient
import com.studio_sdk.api.client.StudioSdkClientImpl
import com.studio_sdk.api.core.ClientOptions
import io.clearstreet.studio.client.StudioSdkClient
import io.clearstreet.studio.client.StudioSdkClientImpl
import io.clearstreet.studio.core.ClientOptions
import java.net.Proxy
import java.time.Clock
import java.time.Duration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// File generated from our OpenAPI spec by Stainless.

package com.studio_sdk.api.client.okhttp
package io.clearstreet.studio.client.okhttp

import com.fasterxml.jackson.databind.json.JsonMapper
import com.studio_sdk.api.client.StudioSdkClientAsync
import com.studio_sdk.api.client.StudioSdkClientAsyncImpl
import com.studio_sdk.api.core.ClientOptions
import io.clearstreet.studio.client.StudioSdkClientAsync
import io.clearstreet.studio.client.StudioSdkClientAsyncImpl
import io.clearstreet.studio.core.ClientOptions
import java.net.Proxy
import java.time.Clock
import java.time.Duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102

package com.studio_sdk.api.client
package io.clearstreet.studio.client

import com.studio_sdk.api.models.*
import com.studio_sdk.api.services.blocking.*
import io.clearstreet.studio.models.*
import io.clearstreet.studio.services.blocking.*

interface StudioSdkClient {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102

package com.studio_sdk.api.client
package io.clearstreet.studio.client

import com.studio_sdk.api.models.*
import com.studio_sdk.api.services.async.*
import io.clearstreet.studio.models.*
import io.clearstreet.studio.services.async.*

interface StudioSdkClientAsync {

Expand Down
Loading
Loading