chore: go live (#1)

This commit is contained in:
stainless-app[bot]
2024-03-19 17:35:06 +00:00
committed by GitHub
parent d566db8856
commit 2c86176ee0
20 changed files with 189 additions and 5 deletions
+39
View File
@@ -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/langchain-ai/langsmith-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@v3
- 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 publish --stacktrace
env:
SONATYPE_USERNAME: ${{ secrets.LANG_SMITH_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LANG_SMITH_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY_ID: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
GPG_SIGNING_KEY: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
+23
View File
@@ -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 == 'langchain-ai/langsmith-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
steps:
- uses: actions/checkout@v3
- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
SONATYPE_USERNAME: ${{ secrets.LANG_SMITH_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LANG_SMITH_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY_ID: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
GPG_SIGNING_KEY: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.LANG_SMITH_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
{
".": "0.0.1-alpha.0"
}
+9 -1
View File
@@ -1,7 +1,11 @@
# Lang Smith Java API Library
<!-- x-release-please-start-version -->
[![Maven Central](https://img.shields.io/maven-central/v/com.langsmith.api/langsmith-java)](https://central.sonatype.com/artifact/com.langsmith.api/langsmith-java/0.0.1-alpha.0)
<!-- x-release-please-end -->
The Lang Smith Java SDK provides convenient access to the Lang Smith REST API from applications written in Java. It includes helper classes with helpful types and documentation for every request and response property.
The Lang Smith Java SDK is similar to the Lang Smith Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions.
@@ -18,6 +22,8 @@ The REST API documentation can be found [on docs.langsmith.com](https://docs.La
#### Gradle
<!-- x-release-please-start-version -->
```kotlin
implementation("com.langsmith.api:langsmith-java:0.0.1-alpha.0")
```
@@ -32,6 +38,8 @@ implementation("com.langsmith.api:langsmith-java:0.0.1-alpha.0")
</dependency>
```
<!-- x-release-please-end -->
### Configure the client
Use `LangSmithOkHttpClient.builder()` to configure the client. At a minimum you need to set `.apiKey()`:
@@ -214,4 +222,4 @@ 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/langsmith-java/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/langchain-ai/langsmith-java/issues) with questions, bugs, or suggestions.
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
warnings=()
errors=()
if [ -z "${SONATYPE_USERNAME}" ]; then
warnings+=("The LANG_SMITH_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 LANG_SMITH_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 LANG_SMITH_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 LANG_SMITH_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!"
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "com.langsmith.api"
version = "0.0.1-alpha.0"
version = "0.0.1-alpha.0" // x-release-please-version
}
nexusPublishing {
Binary file not shown.
@@ -33,9 +33,9 @@ configure<PublishingExtension> {
}
scm {
connection.set("scm:git:git://github.com/stainless-sdks/langsmith-java.git")
developerConnection.set("scm:git:git://github.com/stainless-sdks/langsmith-java.git")
url.set("https://github.com/stainless-sdks/langsmith-java")
connection.set("scm:git:git://github.com/langchain-ai/langsmith-java.git")
developerConnection.set("scm:git:git://github.com/langchain-ai/langsmith-java.git")
url.set("https://github.com/langchain-ai/langsmith-java")
}
versionMapping {
+67
View File
@@ -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"
]
}